diff --git a/packages/svelte/src/store/index.js b/packages/svelte/src/store/index.js index 023161b19a..12ba4ea8ce 100644 --- a/packages/svelte/src/store/index.js +++ b/packages/svelte/src/store/index.js @@ -1,4 +1,5 @@ import { noop, run_all } from '../internal/shared/utils.js'; +import { safe_not_equal } from '../internal/client/reactivity/equality.js'; import { subscribe_to_store } from './utils.js'; /** @@ -21,15 +22,6 @@ export function readable(value, start) { }; } -/** - * @param {any} a - * @param {any} b - * @returns {boolean} - */ -function safe_not_equal(a, b) { - return a != a ? b == b : a !== b || (a && typeof a === 'object') || typeof a === 'function'; -} - /** * Create a `Writable` store that allows both updating and reading by subscription. *