1 |
|
2 |
|
3 |
|
4 | export function comparer(x, y) {
|
5 | return x === y || (typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y));
|
6 | }
|
7 |
|
8 |
|
9 |
|
10 | export async function comparerAsync(x, y) {
|
11 | return x === y || (typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y));
|
12 | }
|
13 |
|
14 |
|
15 |
|
16 | export function equalityComparer(key, minValue) {
|
17 |
|
18 | return key > minValue ? 1 : key < minValue ? -1 : 0;
|
19 | }
|
20 |
|
21 |
|
22 |
|
23 | export async function equalityComparerAsync(key, minValue) {
|
24 |
|
25 | return key > minValue ? 1 : key < minValue ? -1 : 0;
|
26 | }
|
27 |
|
28 |
|