Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 2x 2x 2x 2x 2x 2x 2x 2x 2x 22x 22x 22x 22x 22x 44x 44x 22x 22x | import { snapshot } from '../../shared/clone.js'; import { inspect_effect, validate_effect } from '../reactivity/effects.js'; /** * @param {() => any[]} get_value * @param {Function} [inspector] */ // eslint-disable-next-line no-console export function inspect(get_value, inspector = console.log) { validate_effect('$inspect'); let initial = true; inspect_effect(() => { inspector(initial ? 'init' : 'update', ...snapshot(get_value())); initial = false; }); } |