chore: dedupe safe_not_equal in svelte/store (#12160)

pull/12153/head
Conduitry 6 months ago committed by GitHub
parent 88b0b401ac
commit fd6dd45226
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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.
*

Loading…
Cancel
Save