UNPKG

717 BJavaScriptView Raw
1/**
2 * @ignore
3 */
4export function comparer(x, y) {
5 return x === y || (typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y));
6}
7/**
8 * @ignore
9 */
10export async function comparerAsync(x, y) {
11 return x === y || (typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y));
12}
13/**
14 * @ignore
15 */
16export function equalityComparer(key, minValue) {
17 // eslint-disable-next-line no-nested-ternary
18 return key > minValue ? 1 : key < minValue ? -1 : 0;
19}
20/**
21 * @ignore
22 */
23export async function equalityComparerAsync(key, minValue) {
24 // eslint-disable-next-line no-nested-ternary
25 return key > minValue ? 1 : key < minValue ? -1 : 0;
26}
27
28//# sourceMappingURL=comparer.mjs.map