Skip to content

Commit fd6dd45

Browse files
authored
chore: dedupe safe_not_equal in svelte/store (#12160)
1 parent 88b0b40 commit fd6dd45

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

packages/svelte/src/store/index.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { noop, run_all } from '../internal/shared/utils.js';
2+
import { safe_not_equal } from '../internal/client/reactivity/equality.js';
23
import { subscribe_to_store } from './utils.js';
34

45
/**
@@ -21,15 +22,6 @@ export function readable(value, start) {
2122
};
2223
}
2324

24-
/**
25-
* @param {any} a
26-
* @param {any} b
27-
* @returns {boolean}
28-
*/
29-
function safe_not_equal(a, b) {
30-
return a != a ? b == b : a !== b || (a && typeof a === 'object') || typeof a === 'function';
31-
}
32-
3325
/**
3426
* Create a `Writable` store that allows both updating and reading by subscription.
3527
*

0 commit comments

Comments
 (0)