@oscarpalmer/atoms 0.180.0 → 0.182.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/array/find.d.mts +42 -1
- package/dist/array/find.mjs +5 -1
- package/dist/array/get.mjs +2 -2
- package/dist/array/index.d.mts +3 -3
- package/dist/array/index.mjs +3 -3
- package/dist/index.d.mts +238 -25
- package/dist/index.mjs +242 -19
- package/dist/internal/array/find.d.mts +4 -3
- package/dist/internal/array/find.mjs +5 -2
- package/dist/internal/array/index-of.d.mts +42 -1
- package/dist/internal/array/index-of.mjs +5 -1
- package/dist/internal/math/aggregate.mjs +2 -2
- package/dist/internal/result.mjs +2 -2
- package/dist/internal/string.d.mts +5 -3
- package/dist/internal/string.mjs +14 -5
- package/dist/internal/value/equal.mjs +2 -2
- package/dist/internal/value/handlers.mjs +2 -2
- package/dist/kalas.d.mts +61 -0
- package/dist/kalas.mjs +93 -0
- package/dist/string/case.mjs +10 -4
- package/dist/string/normalize.d.mts +55 -0
- package/dist/string/normalize.mjs +93 -0
- package/dist/value/index.d.mts +2 -1
- package/dist/value/index.mjs +2 -1
- package/dist/value/merge.d.mts +13 -0
- package/dist/value/merge.mjs +3 -1
- package/dist/value/shake.d.mts +7 -0
- package/dist/value/shake.mjs +16 -0
- package/package.json +1 -1
- package/src/array/exists.ts +1 -1
- package/src/array/find.ts +58 -0
- package/src/array/get.ts +2 -2
- package/src/index.ts +3 -0
- package/src/internal/array/find.ts +24 -4
- package/src/internal/array/index-of.ts +59 -1
- package/src/internal/math/aggregate.ts +2 -2
- package/src/internal/result.ts +6 -3
- package/src/internal/string.ts +26 -8
- package/src/internal/value/equal.ts +2 -2
- package/src/internal/value/handlers.ts +2 -2
- package/src/kalas.ts +167 -0
- package/src/string/case.ts +20 -4
- package/src/string/normalize.ts +169 -0
- package/src/value/index.ts +1 -0
- package/src/value/merge.ts +17 -1
- package/src/value/shake.ts +36 -0
package/dist/array/find.d.mts
CHANGED
|
@@ -31,5 +31,46 @@ declare function find<Item>(array: Item[], filter: (item: Item, index: number, a
|
|
|
31
31
|
* @returns First item that matches the value, or `undefined` if no match is found
|
|
32
32
|
*/
|
|
33
33
|
declare function find<Item>(array: Item[], value: Item): Item | undefined;
|
|
34
|
+
declare namespace find {
|
|
35
|
+
var last: typeof findLast;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Get the last item matching the given value
|
|
39
|
+
*
|
|
40
|
+
* Available as `findLast` and `find.last`
|
|
41
|
+
* @param array Array to search in
|
|
42
|
+
* @param callback Callback to get an item's value for matching
|
|
43
|
+
* @param value Value to match against
|
|
44
|
+
* @returns Last item that matches the value, or `undefined` if no match is found
|
|
45
|
+
*/
|
|
46
|
+
declare function findLast<Item, Callback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], callback: Callback, value: ReturnType<Callback>): Item | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Get the last item matching the given value by key
|
|
49
|
+
*
|
|
50
|
+
* Available as `findLast` and `find.last`
|
|
51
|
+
* @param array Array to search in
|
|
52
|
+
* @param key Key to get an item's value for matching
|
|
53
|
+
* @param value Value to match against
|
|
54
|
+
* @returns Last item that matches the value, or `undefined` if no match is found
|
|
55
|
+
*/
|
|
56
|
+
declare function findLast<Item extends PlainObject, ItemKey extends keyof Item>(array: Item[], key: ItemKey, value: Item[ItemKey]): Item | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* Get the last item matching the filter
|
|
59
|
+
*
|
|
60
|
+
* Available as `findLast` and `find.last`
|
|
61
|
+
* @param array Array to search in
|
|
62
|
+
* @param filter Filter callback to match items
|
|
63
|
+
* @returns Last item that matches the filter, or `undefined` if no match is found
|
|
64
|
+
*/
|
|
65
|
+
declare function findLast<Item>(array: Item[], filter: (item: Item, index: number, array: Item[]) => boolean): Item | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Get the last item matching the given value
|
|
68
|
+
*
|
|
69
|
+
* Available as `findLast` and `find.last`
|
|
70
|
+
* @param array Array to search in
|
|
71
|
+
* @param value Value to match against
|
|
72
|
+
* @returns Last item that matches the value, or `undefined` if no match is found
|
|
73
|
+
*/
|
|
74
|
+
declare function findLast<Item>(array: Item[], value: Item): Item | undefined;
|
|
34
75
|
//#endregion
|
|
35
|
-
export { find };
|
|
76
|
+
export { find, findLast };
|
package/dist/array/find.mjs
CHANGED
|
@@ -3,5 +3,9 @@ import { FIND_VALUE_ITEM, findValue } from "../internal/array/find.mjs";
|
|
|
3
3
|
function find(array, ...parameters) {
|
|
4
4
|
return findValue(FIND_VALUE_ITEM, array, parameters, false);
|
|
5
5
|
}
|
|
6
|
+
find.last = findLast;
|
|
7
|
+
function findLast(array, ...parameters) {
|
|
8
|
+
return findValue(FIND_VALUE_ITEM, array, parameters, true);
|
|
9
|
+
}
|
|
6
10
|
//#endregion
|
|
7
|
-
export { find };
|
|
11
|
+
export { find, findLast };
|
package/dist/array/get.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isNonPlainObject } from "../internal/is.mjs";
|
|
2
2
|
//#region src/array/get.ts
|
|
3
3
|
function getArray(value, indiced) {
|
|
4
4
|
if (Array.isArray(value)) return value;
|
|
5
5
|
if (value instanceof Map || value instanceof Set) return [...value.values()];
|
|
6
|
-
if (
|
|
6
|
+
if (isNonPlainObject(value)) return [value];
|
|
7
7
|
if (indiced !== true) return Object.values(value);
|
|
8
8
|
const keys = Object.keys(value);
|
|
9
9
|
const { length } = keys;
|
package/dist/array/index.d.mts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { difference } from "./difference.mjs";
|
|
2
2
|
import { exists } from "./exists.mjs";
|
|
3
|
-
import { find } from "./find.mjs";
|
|
3
|
+
import { find, findLast } from "./find.mjs";
|
|
4
4
|
import { flatten } from "./flatten.mjs";
|
|
5
5
|
import { range, times } from "./from.mjs";
|
|
6
6
|
import { getArray } from "./get.mjs";
|
|
7
7
|
import { chunk } from "../internal/array/chunk.mjs";
|
|
8
8
|
import { compact } from "../internal/array/compact.mjs";
|
|
9
|
-
import { indexOf } from "../internal/array/index-of.mjs";
|
|
9
|
+
import { indexOf, lastIndexOf } from "../internal/array/index-of.mjs";
|
|
10
10
|
import { shuffle } from "../internal/array/shuffle.mjs";
|
|
11
11
|
import { insert } from "./insert.mjs";
|
|
12
12
|
import { intersection } from "./intersection.mjs";
|
|
@@ -23,4 +23,4 @@ import { toggle } from "./toggle.mjs";
|
|
|
23
23
|
import { union } from "./union.mjs";
|
|
24
24
|
import { unique } from "./unique.mjs";
|
|
25
25
|
import { update } from "./update.mjs";
|
|
26
|
-
export { ArrayPosition, chunk, compact, difference, drop, endsWithArray, exists, find, flatten, getArray, getArrayPosition, includesArray, indexOf, indexOfArray, insert, intersection, partition, push, range, reverse, select, shuffle, single, slice, splice, startsWithArray, take, times, toSet, toggle, union, unique, update };
|
|
26
|
+
export { ArrayPosition, chunk, compact, difference, drop, endsWithArray, exists, find, findLast, flatten, getArray, getArrayPosition, includesArray, indexOf, indexOfArray, insert, intersection, lastIndexOf, partition, push, range, reverse, select, shuffle, single, slice, splice, startsWithArray, take, times, toSet, toggle, union, unique, update };
|
package/dist/array/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { chunk } from "../internal/array/chunk.mjs";
|
|
2
2
|
import { compact } from "../internal/array/compact.mjs";
|
|
3
|
-
import { indexOf } from "../internal/array/index-of.mjs";
|
|
3
|
+
import { indexOf, lastIndexOf } from "../internal/array/index-of.mjs";
|
|
4
4
|
import { shuffle } from "../internal/array/shuffle.mjs";
|
|
5
5
|
import { difference } from "./difference.mjs";
|
|
6
6
|
import { exists } from "./exists.mjs";
|
|
7
|
-
import { find } from "./find.mjs";
|
|
7
|
+
import { find, findLast } from "./find.mjs";
|
|
8
8
|
import { flatten } from "./flatten.mjs";
|
|
9
9
|
import { range, times } from "./from.mjs";
|
|
10
10
|
import { getArray } from "./get.mjs";
|
|
@@ -23,4 +23,4 @@ import { toggle } from "./toggle.mjs";
|
|
|
23
23
|
import { union } from "./union.mjs";
|
|
24
24
|
import { unique } from "./unique.mjs";
|
|
25
25
|
import { update } from "./update.mjs";
|
|
26
|
-
export { chunk, compact, difference, drop, endsWithArray, exists, find, flatten, getArray, getArrayPosition, includesArray, indexOf, indexOfArray, insert, intersection, partition, push, range, reverse, select, shuffle, single, slice, splice, startsWithArray, take, times, toSet, toggle, union, unique, update };
|
|
26
|
+
export { chunk, compact, difference, drop, endsWithArray, exists, find, findLast, flatten, getArray, getArrayPosition, includesArray, indexOf, indexOfArray, insert, intersection, lastIndexOf, partition, push, range, reverse, select, shuffle, single, slice, splice, startsWithArray, take, times, toSet, toggle, union, unique, update };
|
package/dist/index.d.mts
CHANGED
|
@@ -49,7 +49,7 @@ type GenericCallback = (...args: any[]) => any;
|
|
|
49
49
|
/**
|
|
50
50
|
* A generic key type
|
|
51
51
|
*/
|
|
52
|
-
type Key = number | string;
|
|
52
|
+
type Key$1 = number | string;
|
|
53
53
|
type KeyedValue<Item, ItemKey extends keyof Item> = Item[ItemKey] extends PropertyKey ? Item[ItemKey] : never;
|
|
54
54
|
/**
|
|
55
55
|
* A nested array
|
|
@@ -303,7 +303,7 @@ declare function firstOrDefault<Item>(array: Item[], defaultValue: Item): Item;
|
|
|
303
303
|
* @param value Callback to get an item's value
|
|
304
304
|
* @returns Record of keyed values
|
|
305
305
|
*/
|
|
306
|
-
declare function groupBy<Item, KeyCallback extends (item: Item, index: number, array: Item[]) => Key, ValueCallback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], key: KeyCallback, value: ValueCallback): Simplify<Record<ReturnType<KeyCallback>, ReturnType<ValueCallback>>>;
|
|
306
|
+
declare function groupBy<Item, KeyCallback extends (item: Item, index: number, array: Item[]) => Key$1, ValueCallback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], key: KeyCallback, value: ValueCallback): Simplify<Record<ReturnType<KeyCallback>, ReturnType<ValueCallback>>>;
|
|
307
307
|
/**
|
|
308
308
|
* Create a record from an array of items using a specific key and value
|
|
309
309
|
*
|
|
@@ -313,7 +313,7 @@ declare function groupBy<Item, KeyCallback extends (item: Item, index: number, a
|
|
|
313
313
|
* @param value Key to use for value
|
|
314
314
|
* @returns Record of keyed values
|
|
315
315
|
*/
|
|
316
|
-
declare function groupBy<Item extends PlainObject, KeyCallback extends (item: Item, index: number, array: Item[]) => Key, ItemValue extends keyof Item>(array: Item[], key: KeyCallback, value: ItemValue): Record<ReturnType<KeyCallback>, Item[ItemValue]>;
|
|
316
|
+
declare function groupBy<Item extends PlainObject, KeyCallback extends (item: Item, index: number, array: Item[]) => Key$1, ItemValue extends keyof Item>(array: Item[], key: KeyCallback, value: ItemValue): Record<ReturnType<KeyCallback>, Item[ItemValue]>;
|
|
317
317
|
/**
|
|
318
318
|
* Create a record from an array of items using a specific key and value
|
|
319
319
|
*
|
|
@@ -342,7 +342,7 @@ declare function groupBy<Item extends PlainObject, ItemKey extends keyof Item, I
|
|
|
342
342
|
* @param callback Callback to get an item's grouping key
|
|
343
343
|
* @returns Record of keyed items
|
|
344
344
|
*/
|
|
345
|
-
declare function groupBy<Item, Callback extends (item: Item, index: number, array: Item[]) => Key>(array: Item[], callback: Callback): Record<ReturnType<Callback>, Item>;
|
|
345
|
+
declare function groupBy<Item, Callback extends (item: Item, index: number, array: Item[]) => Key$1>(array: Item[], callback: Callback): Record<ReturnType<Callback>, Item>;
|
|
346
346
|
/**
|
|
347
347
|
* Create a record from an array of items using a specific key
|
|
348
348
|
*
|
|
@@ -370,7 +370,7 @@ declare namespace groupBy {
|
|
|
370
370
|
* @param value Callback to get an item's value
|
|
371
371
|
* @returns Record of keyed values
|
|
372
372
|
*/
|
|
373
|
-
declare function groupArraysBy<Item, KeyCallback extends (item: Item, index: number, array: Item[]) => Key, ValueCallback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], key: KeyCallback, value: ValueCallback): Record<ReturnType<KeyCallback>, ReturnType<ValueCallback>[]>;
|
|
373
|
+
declare function groupArraysBy<Item, KeyCallback extends (item: Item, index: number, array: Item[]) => Key$1, ValueCallback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], key: KeyCallback, value: ValueCallback): Record<ReturnType<KeyCallback>, ReturnType<ValueCallback>[]>;
|
|
374
374
|
/**
|
|
375
375
|
* Create a record from an array of items using a specific key and value, grouping values into arrays
|
|
376
376
|
*
|
|
@@ -380,7 +380,7 @@ declare function groupArraysBy<Item, KeyCallback extends (item: Item, index: num
|
|
|
380
380
|
* @param value Key to use for value
|
|
381
381
|
* @returns Record of keyed values
|
|
382
382
|
*/
|
|
383
|
-
declare function groupArraysBy<Item extends PlainObject, KeyCallback extends (item: Item, index: number, array: Item[]) => Key, ItemValue extends keyof Item>(array: Item[], key: KeyCallback, value: ItemValue): Record<ReturnType<KeyCallback>, Item[ItemValue][]>;
|
|
383
|
+
declare function groupArraysBy<Item extends PlainObject, KeyCallback extends (item: Item, index: number, array: Item[]) => Key$1, ItemValue extends keyof Item>(array: Item[], key: KeyCallback, value: ItemValue): Record<ReturnType<KeyCallback>, Item[ItemValue][]>;
|
|
384
384
|
/**
|
|
385
385
|
* Create a record from an array of items using a specific key and value, grouping values into arrays
|
|
386
386
|
*
|
|
@@ -409,7 +409,7 @@ declare function groupArraysBy<Item extends PlainObject, ItemKey extends keyof I
|
|
|
409
409
|
* @param callback Callback to get an item's grouping key
|
|
410
410
|
* @returns Record of keyed items
|
|
411
411
|
*/
|
|
412
|
-
declare function groupArraysBy<Item, Callback extends (item: Item, index: number, array: Item[]) => Key>(array: Item[], callback: Callback): Record<ReturnType<Callback>, Item[]>;
|
|
412
|
+
declare function groupArraysBy<Item, Callback extends (item: Item, index: number, array: Item[]) => Key$1>(array: Item[], callback: Callback): Record<ReturnType<Callback>, Item[]>;
|
|
413
413
|
/**
|
|
414
414
|
* Create a record from an array of items using a specific key, grouping items into arrays
|
|
415
415
|
*
|
|
@@ -475,6 +475,47 @@ declare function indexOf<Item>(array: Item[], filter: (item: Item, index: number
|
|
|
475
475
|
* @returns Index of the first matching item, or `-1` if no match is found
|
|
476
476
|
*/
|
|
477
477
|
declare function indexOf<Item>(array: Item[], item: Item): number;
|
|
478
|
+
declare namespace indexOf {
|
|
479
|
+
var last: typeof lastIndexOf;
|
|
480
|
+
}
|
|
481
|
+
/**
|
|
482
|
+
* Get the index of the last matching item by callback
|
|
483
|
+
*
|
|
484
|
+
* Available as `lastIndexOf` and `indexOf.last`
|
|
485
|
+
* @param array Array to search in
|
|
486
|
+
* @param callback Callback to get an item's value
|
|
487
|
+
* @param value Value to match against
|
|
488
|
+
* @returns Index of the last matching item, or `-1` if no match is found
|
|
489
|
+
*/
|
|
490
|
+
declare function lastIndexOf<Item, Callback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], callback: Callback, value: ReturnType<Callback>): number;
|
|
491
|
+
/**
|
|
492
|
+
* Get the index of the last matching item by key
|
|
493
|
+
*
|
|
494
|
+
* Available as `lastIndexOf` and `indexOf.last`
|
|
495
|
+
* @param array Array to search in
|
|
496
|
+
* @param key Key to match items by
|
|
497
|
+
* @param value Value to match against
|
|
498
|
+
* @returns Index of the last matching item, or `-1` if no match is found
|
|
499
|
+
*/
|
|
500
|
+
declare function lastIndexOf<Item extends PlainObject, ItemKey extends keyof Item>(array: Item[], key: ItemKey, value: Item[ItemKey]): number;
|
|
501
|
+
/**
|
|
502
|
+
* Get the index of the last item matching the filter
|
|
503
|
+
*
|
|
504
|
+
* Available as `lastIndexOf` and `indexOf.last`
|
|
505
|
+
* @param array Array to search in
|
|
506
|
+
* @param filter Filter callback to match items
|
|
507
|
+
* @returns Index of the last matching item, or `-1` if no match is found
|
|
508
|
+
*/
|
|
509
|
+
declare function lastIndexOf<Item>(array: Item[], filter: (item: Item, index: number, array: Item[]) => boolean): number;
|
|
510
|
+
/**
|
|
511
|
+
* Get the index of the last item matching the given item
|
|
512
|
+
*
|
|
513
|
+
* Available as `lastIndexOf` and `indexOf.last`
|
|
514
|
+
* @param array Array to search in
|
|
515
|
+
* @param item Item to match against
|
|
516
|
+
* @returns Index of the last matching item, or `-1` if no match is found
|
|
517
|
+
*/
|
|
518
|
+
declare function lastIndexOf<Item>(array: Item[], item: Item): number;
|
|
478
519
|
//#endregion
|
|
479
520
|
//#region src/internal/array/shuffle.d.ts
|
|
480
521
|
/**
|
|
@@ -572,6 +613,47 @@ declare function find<Item>(array: Item[], filter: (item: Item, index: number, a
|
|
|
572
613
|
* @returns First item that matches the value, or `undefined` if no match is found
|
|
573
614
|
*/
|
|
574
615
|
declare function find<Item>(array: Item[], value: Item): Item | undefined;
|
|
616
|
+
declare namespace find {
|
|
617
|
+
var last: typeof findLast;
|
|
618
|
+
}
|
|
619
|
+
/**
|
|
620
|
+
* Get the last item matching the given value
|
|
621
|
+
*
|
|
622
|
+
* Available as `findLast` and `find.last`
|
|
623
|
+
* @param array Array to search in
|
|
624
|
+
* @param callback Callback to get an item's value for matching
|
|
625
|
+
* @param value Value to match against
|
|
626
|
+
* @returns Last item that matches the value, or `undefined` if no match is found
|
|
627
|
+
*/
|
|
628
|
+
declare function findLast<Item, Callback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], callback: Callback, value: ReturnType<Callback>): Item | undefined;
|
|
629
|
+
/**
|
|
630
|
+
* Get the last item matching the given value by key
|
|
631
|
+
*
|
|
632
|
+
* Available as `findLast` and `find.last`
|
|
633
|
+
* @param array Array to search in
|
|
634
|
+
* @param key Key to get an item's value for matching
|
|
635
|
+
* @param value Value to match against
|
|
636
|
+
* @returns Last item that matches the value, or `undefined` if no match is found
|
|
637
|
+
*/
|
|
638
|
+
declare function findLast<Item extends PlainObject, ItemKey extends keyof Item>(array: Item[], key: ItemKey, value: Item[ItemKey]): Item | undefined;
|
|
639
|
+
/**
|
|
640
|
+
* Get the last item matching the filter
|
|
641
|
+
*
|
|
642
|
+
* Available as `findLast` and `find.last`
|
|
643
|
+
* @param array Array to search in
|
|
644
|
+
* @param filter Filter callback to match items
|
|
645
|
+
* @returns Last item that matches the filter, or `undefined` if no match is found
|
|
646
|
+
*/
|
|
647
|
+
declare function findLast<Item>(array: Item[], filter: (item: Item, index: number, array: Item[]) => boolean): Item | undefined;
|
|
648
|
+
/**
|
|
649
|
+
* Get the last item matching the given value
|
|
650
|
+
*
|
|
651
|
+
* Available as `findLast` and `find.last`
|
|
652
|
+
* @param array Array to search in
|
|
653
|
+
* @param value Value to match against
|
|
654
|
+
* @returns Last item that matches the value, or `undefined` if no match is found
|
|
655
|
+
*/
|
|
656
|
+
declare function findLast<Item>(array: Item[], value: Item): Item | undefined;
|
|
575
657
|
//#endregion
|
|
576
658
|
//#region src/array/flatten.d.ts
|
|
577
659
|
/**
|
|
@@ -1685,7 +1767,7 @@ declare function swapIndices<Item>(array: Item[], first: number, second: number)
|
|
|
1685
1767
|
* @param value Callback to get an item's value
|
|
1686
1768
|
* @returns Map of keyed values
|
|
1687
1769
|
*/
|
|
1688
|
-
declare function toMap<Item, KeyCallback extends (item: Item, index: number, array: Item[]) => Key, ValueCallback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], key: KeyCallback, value: ValueCallback): Map<ReturnType<KeyCallback>, ReturnType<ValueCallback>>;
|
|
1770
|
+
declare function toMap<Item, KeyCallback extends (item: Item, index: number, array: Item[]) => Key$1, ValueCallback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], key: KeyCallback, value: ValueCallback): Map<ReturnType<KeyCallback>, ReturnType<ValueCallback>>;
|
|
1689
1771
|
/**
|
|
1690
1772
|
* Create a Map from an array of items using a callback and value
|
|
1691
1773
|
*
|
|
@@ -1695,7 +1777,7 @@ declare function toMap<Item, KeyCallback extends (item: Item, index: number, arr
|
|
|
1695
1777
|
* @param value Key to use for value
|
|
1696
1778
|
* @returns Map of keyed values
|
|
1697
1779
|
*/
|
|
1698
|
-
declare function toMap<Item extends PlainObject, KeyCallback extends (item: Item, index: number, array: Item[]) => Key, ItemValue extends keyof Item>(array: Item[], key: KeyCallback, value: ItemValue): Map<ReturnType<KeyCallback>, Item[ItemValue]>;
|
|
1780
|
+
declare function toMap<Item extends PlainObject, KeyCallback extends (item: Item, index: number, array: Item[]) => Key$1, ItemValue extends keyof Item>(array: Item[], key: KeyCallback, value: ItemValue): Map<ReturnType<KeyCallback>, Item[ItemValue]>;
|
|
1699
1781
|
/**
|
|
1700
1782
|
* Create a Map from an array of items using a key and callback
|
|
1701
1783
|
*
|
|
@@ -1724,7 +1806,7 @@ declare function toMap<Item extends PlainObject, ItemKey extends keyof Item, Ite
|
|
|
1724
1806
|
* @param callback Callback to get an item's grouping key
|
|
1725
1807
|
* @returns Map of keyed items
|
|
1726
1808
|
*/
|
|
1727
|
-
declare function toMap<Item, Callback extends (item: Item, index: number, array: Item[]) => Key>(array: Item[], callback: Callback): Map<ReturnType<Callback>, Item>;
|
|
1809
|
+
declare function toMap<Item, Callback extends (item: Item, index: number, array: Item[]) => Key$1>(array: Item[], callback: Callback): Map<ReturnType<Callback>, Item>;
|
|
1728
1810
|
/**
|
|
1729
1811
|
* Create a Map from an array of items using a key
|
|
1730
1812
|
*
|
|
@@ -1752,7 +1834,7 @@ declare namespace toMap {
|
|
|
1752
1834
|
* @param value Callback to get an item's value
|
|
1753
1835
|
* @returns Map of keyed arrays of values
|
|
1754
1836
|
*/
|
|
1755
|
-
declare function toMapArrays<Item, KeyCallback extends (item: Item, index: number, array: Item[]) => Key, ValueCallback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], key: KeyCallback, value: ValueCallback): Map<ReturnType<KeyCallback>, ReturnType<ValueCallback>[]>;
|
|
1837
|
+
declare function toMapArrays<Item, KeyCallback extends (item: Item, index: number, array: Item[]) => Key$1, ValueCallback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], key: KeyCallback, value: ValueCallback): Map<ReturnType<KeyCallback>, ReturnType<ValueCallback>[]>;
|
|
1756
1838
|
/**
|
|
1757
1839
|
* Create a Map from an array of items using a callback and value, grouping values into arrays
|
|
1758
1840
|
*
|
|
@@ -1762,7 +1844,7 @@ declare function toMapArrays<Item, KeyCallback extends (item: Item, index: numbe
|
|
|
1762
1844
|
* @param value Key to use for value
|
|
1763
1845
|
* @returns Map of keyed arrays of values
|
|
1764
1846
|
*/
|
|
1765
|
-
declare function toMapArrays<Item extends PlainObject, KeyCallback extends (item: Item, index: number, array: Item[]) => Key, ItemValue extends keyof Item>(array: Item[], key: KeyCallback, value: ItemValue): Map<ReturnType<KeyCallback>, Item[ItemValue][]>;
|
|
1847
|
+
declare function toMapArrays<Item extends PlainObject, KeyCallback extends (item: Item, index: number, array: Item[]) => Key$1, ItemValue extends keyof Item>(array: Item[], key: KeyCallback, value: ItemValue): Map<ReturnType<KeyCallback>, Item[ItemValue][]>;
|
|
1766
1848
|
/**
|
|
1767
1849
|
* Create a Map from an array of items using a key and callback, grouping values into arrays
|
|
1768
1850
|
*
|
|
@@ -1791,7 +1873,7 @@ declare function toMapArrays<Item extends PlainObject, ItemKey extends keyof Ite
|
|
|
1791
1873
|
* @param callback Callback to get an item's grouping key
|
|
1792
1874
|
* @returns Map of keyed arrays of items
|
|
1793
1875
|
*/
|
|
1794
|
-
declare function toMapArrays<Item, Callback extends (item: Item, index: number, array: Item[]) => Key>(array: Item[], callback: Callback): Map<ReturnType<Callback>, Item[]>;
|
|
1876
|
+
declare function toMapArrays<Item, Callback extends (item: Item, index: number, array: Item[]) => Key$1>(array: Item[], callback: Callback): Map<ReturnType<Callback>, Item[]>;
|
|
1795
1877
|
/**
|
|
1796
1878
|
* Create a Map from an array of items using a key, grouping items into arrays
|
|
1797
1879
|
*
|
|
@@ -1812,7 +1894,7 @@ declare function toMapArrays<Item extends PlainObject, ItemKey extends keyof Ite
|
|
|
1812
1894
|
* @param value Callback to get an item's value
|
|
1813
1895
|
* @returns Record of keyed values
|
|
1814
1896
|
*/
|
|
1815
|
-
declare function toRecord<Item, KeyCallback extends (item: Item, index: number, array: Item[]) => Key, ValueCallback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], key: KeyCallback, value: ValueCallback): Record<ReturnType<KeyCallback>, ReturnType<ValueCallback>>;
|
|
1897
|
+
declare function toRecord<Item, KeyCallback extends (item: Item, index: number, array: Item[]) => Key$1, ValueCallback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], key: KeyCallback, value: ValueCallback): Record<ReturnType<KeyCallback>, ReturnType<ValueCallback>>;
|
|
1816
1898
|
/**
|
|
1817
1899
|
* Create a record from an array of items using a callback and value
|
|
1818
1900
|
*
|
|
@@ -1822,7 +1904,7 @@ declare function toRecord<Item, KeyCallback extends (item: Item, index: number,
|
|
|
1822
1904
|
* @param value Key to use for value
|
|
1823
1905
|
* @returns Record with keys
|
|
1824
1906
|
*/
|
|
1825
|
-
declare function toRecord<Item extends PlainObject, Callback extends (item: Item, index: number, array: Item[]) => Key, ItemValue extends keyof Item>(array: Item[], callback: Callback, value: ItemValue): Record<ReturnType<Callback>, Item[ItemValue]>;
|
|
1907
|
+
declare function toRecord<Item extends PlainObject, Callback extends (item: Item, index: number, array: Item[]) => Key$1, ItemValue extends keyof Item>(array: Item[], callback: Callback, value: ItemValue): Record<ReturnType<Callback>, Item[ItemValue]>;
|
|
1826
1908
|
/**
|
|
1827
1909
|
* Create a record from an array of items using a key and callback
|
|
1828
1910
|
*
|
|
@@ -1851,7 +1933,7 @@ declare function toRecord<Item extends PlainObject, ItemKey extends keyof Item,
|
|
|
1851
1933
|
* @param callback Callback to get an item's grouping key
|
|
1852
1934
|
* @returns Record of keyed values
|
|
1853
1935
|
*/
|
|
1854
|
-
declare function toRecord<Item, Callback extends (item: Item, index: number, array: Item[]) => Key>(array: Item[], callback: Callback): Record<ReturnType<Callback>, Item>;
|
|
1936
|
+
declare function toRecord<Item, Callback extends (item: Item, index: number, array: Item[]) => Key$1>(array: Item[], callback: Callback): Record<ReturnType<Callback>, Item>;
|
|
1855
1937
|
/**
|
|
1856
1938
|
* Create a record from an array of items using a key
|
|
1857
1939
|
*
|
|
@@ -1879,7 +1961,7 @@ declare namespace toRecord {
|
|
|
1879
1961
|
* @param value Callback to get an item's value
|
|
1880
1962
|
* @returns Record of keyed arrays of values
|
|
1881
1963
|
*/
|
|
1882
|
-
declare function toRecordArrays<Item, KeyCallback extends (item: Item, index: number, array: Item[]) => Key, ValueCallback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], key: KeyCallback, value: ValueCallback): Record<ReturnType<KeyCallback>, ReturnType<ValueCallback>[]>;
|
|
1964
|
+
declare function toRecordArrays<Item, KeyCallback extends (item: Item, index: number, array: Item[]) => Key$1, ValueCallback extends (item: Item, index: number, array: Item[]) => unknown>(array: Item[], key: KeyCallback, value: ValueCallback): Record<ReturnType<KeyCallback>, ReturnType<ValueCallback>[]>;
|
|
1883
1965
|
/**
|
|
1884
1966
|
* Create a record from an array of items using a callback and value, grouping values into arrays
|
|
1885
1967
|
*
|
|
@@ -1889,7 +1971,7 @@ declare function toRecordArrays<Item, KeyCallback extends (item: Item, index: nu
|
|
|
1889
1971
|
* @param value Key to use for value
|
|
1890
1972
|
* @returns Record of keyed arrays of values
|
|
1891
1973
|
*/
|
|
1892
|
-
declare function toRecordArrays<Item extends PlainObject, Callback extends (item: Item, index: number, array: Item[]) => Key, ItemValue extends keyof Item>(array: Item[], callback: Callback, value: ItemValue): Record<ReturnType<Callback>, Item[ItemValue][]>;
|
|
1974
|
+
declare function toRecordArrays<Item extends PlainObject, Callback extends (item: Item, index: number, array: Item[]) => Key$1, ItemValue extends keyof Item>(array: Item[], callback: Callback, value: ItemValue): Record<ReturnType<Callback>, Item[ItemValue][]>;
|
|
1893
1975
|
/**
|
|
1894
1976
|
* Create a record from an array of items using a key and callback, grouping values into arrays
|
|
1895
1977
|
*
|
|
@@ -1918,7 +2000,7 @@ declare function toRecordArrays<Item extends PlainObject, ItemKey extends keyof
|
|
|
1918
2000
|
* @param callback Callback to get an item's grouping key
|
|
1919
2001
|
* @returns Record of keyed arrays of items
|
|
1920
2002
|
*/
|
|
1921
|
-
declare function toRecordArrays<Item, Callback extends (item: Item, index: number, array: Item[]) => Key>(array: Item[], callback: Callback): Record<ReturnType<Callback>, Item[]>;
|
|
2003
|
+
declare function toRecordArrays<Item, Callback extends (item: Item, index: number, array: Item[]) => Key$1>(array: Item[], callback: Callback): Record<ReturnType<Callback>, Item[]>;
|
|
1922
2004
|
/**
|
|
1923
2005
|
* Create a record from an array of items using a key, grouping items into arrays
|
|
1924
2006
|
*
|
|
@@ -2564,12 +2646,14 @@ declare namespace pipe {
|
|
|
2564
2646
|
declare function getString(value: unknown): string;
|
|
2565
2647
|
declare function ignoreKey(key: string): boolean;
|
|
2566
2648
|
/**
|
|
2567
|
-
* Join an array of values into a string
|
|
2568
|
-
*
|
|
2649
|
+
* Join an array of values into a string _(while ignoring empty values)_
|
|
2650
|
+
*
|
|
2651
|
+
* _(`null`, `undefined`, and any values that become whitespace-only strings are considered empty)_
|
|
2652
|
+
* @param array Array of values
|
|
2569
2653
|
* @param delimiter Delimiter to use between values
|
|
2570
2654
|
* @returns Joined string
|
|
2571
2655
|
*/
|
|
2572
|
-
declare function join(
|
|
2656
|
+
declare function join(array: unknown[], delimiter?: string): string;
|
|
2573
2657
|
declare function tryDecode(value: string): string;
|
|
2574
2658
|
declare function tryEncode(value: boolean | number | string): unknown;
|
|
2575
2659
|
/**
|
|
@@ -2792,6 +2876,64 @@ declare function setValue<Data extends PlainObject, Path extends NestedKeys<Data
|
|
|
2792
2876
|
*/
|
|
2793
2877
|
declare function setValue<Data extends PlainObject>(data: Data, path: string, value: unknown, ignoreCase?: boolean): Data;
|
|
2794
2878
|
//#endregion
|
|
2879
|
+
//#region src/kalas.d.ts
|
|
2880
|
+
declare class Events<Map extends Record<string, GenericCallback>> {
|
|
2881
|
+
#private;
|
|
2882
|
+
constructor(kalas: Kalas<Map>);
|
|
2883
|
+
/**
|
|
2884
|
+
* Subscribe to an event with a callback
|
|
2885
|
+
* @param event Event name
|
|
2886
|
+
* @param callback Callback function
|
|
2887
|
+
* @returns Unsubscriber function
|
|
2888
|
+
*/
|
|
2889
|
+
subscribe<Event extends keyof Map>(event: Event, callback: Map[Event]): Unsubscriber;
|
|
2890
|
+
/**
|
|
2891
|
+
* Unsubscribe from an event with a callback _(or all callbacks, if no callback is provided)_
|
|
2892
|
+
* @param event Event name
|
|
2893
|
+
* @param callback Callback function
|
|
2894
|
+
* @returns Unsubscriber function
|
|
2895
|
+
*/
|
|
2896
|
+
unsubscribe<Event extends keyof Map>(event: Event, callback?: Map[Event]): void;
|
|
2897
|
+
}
|
|
2898
|
+
declare class Kalas<Map extends Record<string, GenericCallback>> {
|
|
2899
|
+
#private;
|
|
2900
|
+
/**
|
|
2901
|
+
* Events interface for subscribing and unsubscribing to events
|
|
2902
|
+
*/
|
|
2903
|
+
readonly events: Events<Map>;
|
|
2904
|
+
constructor(names: (keyof Map)[]);
|
|
2905
|
+
/**
|
|
2906
|
+
* Remove all event subscribers
|
|
2907
|
+
*/
|
|
2908
|
+
clear(): void;
|
|
2909
|
+
/**
|
|
2910
|
+
* Emit an event with parameters
|
|
2911
|
+
* @param event Event name
|
|
2912
|
+
* @param parameters Event parameters
|
|
2913
|
+
*/
|
|
2914
|
+
emit<Event extends keyof Map>(event: Event, ...parameters: Parameters<Map[Event]>): void;
|
|
2915
|
+
/**
|
|
2916
|
+
* Subscribe to an event with a callback
|
|
2917
|
+
* @param event Event name
|
|
2918
|
+
* @param callback Callback function
|
|
2919
|
+
* @returns Unsubscriber function
|
|
2920
|
+
*/
|
|
2921
|
+
subscribe<Event extends keyof Map>(event: Event, callback: Map[Event]): Unsubscriber;
|
|
2922
|
+
/**
|
|
2923
|
+
* Unsubscribe from an event with a callback _(or all callbacks, if no callback is provided)_
|
|
2924
|
+
* @param event Event name
|
|
2925
|
+
* @param callback Callback function
|
|
2926
|
+
*/
|
|
2927
|
+
unsubscribe<Event extends keyof Map>(event: Event, callback?: Map[Event]): void;
|
|
2928
|
+
}
|
|
2929
|
+
type Unsubscriber = () => void;
|
|
2930
|
+
/**
|
|
2931
|
+
* Create a Kalas _(party)_ for named events
|
|
2932
|
+
* @param names Event names
|
|
2933
|
+
* @returns Kalas instance
|
|
2934
|
+
*/
|
|
2935
|
+
declare function kalas<Events extends Record<string, GenericCallback>>(names: (keyof Events)[]): Kalas<Events>;
|
|
2936
|
+
//#endregion
|
|
2795
2937
|
//#region src/string/case.d.ts
|
|
2796
2938
|
/**
|
|
2797
2939
|
* Convert a string to camel case _(thisIsCamelCase)_
|
|
@@ -3015,6 +3157,60 @@ declare function includes(haystack: string, needle: string, ignoreCase?: boolean
|
|
|
3015
3157
|
*/
|
|
3016
3158
|
declare function startsWith(haystack: string, needle: string, ignoreCase?: boolean): boolean;
|
|
3017
3159
|
//#endregion
|
|
3160
|
+
//#region src/string/normalize.d.ts
|
|
3161
|
+
/**
|
|
3162
|
+
* Options for normalizing a string
|
|
3163
|
+
*/
|
|
3164
|
+
type NormalizeOptions = {
|
|
3165
|
+
/**
|
|
3166
|
+
* Remove diacritical marks from the string? _(defaults to `true`)_
|
|
3167
|
+
*/
|
|
3168
|
+
deburr?: boolean;
|
|
3169
|
+
/**
|
|
3170
|
+
* Convert the string to lower case? _(defaults to `true`)_
|
|
3171
|
+
*/
|
|
3172
|
+
lowerCase?: boolean;
|
|
3173
|
+
/**
|
|
3174
|
+
* Trim the string? _(defaults to `true`)_
|
|
3175
|
+
*/
|
|
3176
|
+
trim?: boolean;
|
|
3177
|
+
};
|
|
3178
|
+
/**
|
|
3179
|
+
* String normalizer function
|
|
3180
|
+
*/
|
|
3181
|
+
type Normalizer = {
|
|
3182
|
+
/**
|
|
3183
|
+
* Normalize a string
|
|
3184
|
+
* @param value String to normalize
|
|
3185
|
+
* @returns Normalized string
|
|
3186
|
+
*/
|
|
3187
|
+
(value: string): string;
|
|
3188
|
+
};
|
|
3189
|
+
/**
|
|
3190
|
+
* Deburr a string, removing diacritical marks
|
|
3191
|
+
* @param value String to deburr
|
|
3192
|
+
* @returns Deburred string
|
|
3193
|
+
*/
|
|
3194
|
+
declare function deburr(value: string): string;
|
|
3195
|
+
/**
|
|
3196
|
+
* Initialize a string normalizer
|
|
3197
|
+
* @param options Normalization options
|
|
3198
|
+
* @returns Normalizer function
|
|
3199
|
+
*/
|
|
3200
|
+
declare function initializeNormalizer(options?: NormalizeOptions): Normalizer;
|
|
3201
|
+
/**
|
|
3202
|
+
* Normalize a string
|
|
3203
|
+
*
|
|
3204
|
+
* By default, the string will be trimmed, deburred, and then lowercased
|
|
3205
|
+
* @param value String to normalize
|
|
3206
|
+
* @param options Normalization options
|
|
3207
|
+
* @returns Normalized string
|
|
3208
|
+
*/
|
|
3209
|
+
declare function normalize(value: string, options?: NormalizeOptions): string;
|
|
3210
|
+
declare namespace normalize {
|
|
3211
|
+
var initialize: typeof initializeNormalizer;
|
|
3212
|
+
}
|
|
3213
|
+
//#endregion
|
|
3018
3214
|
//#region src/string/template.d.ts
|
|
3019
3215
|
/**
|
|
3020
3216
|
* Options for templating strings
|
|
@@ -3182,6 +3378,10 @@ declare function omit<Value extends PlainObject, ValueKey extends keyof Value>(v
|
|
|
3182
3378
|
*/
|
|
3183
3379
|
declare function pick<Value extends PlainObject, ValueKey extends keyof Value>(value: Value, keys: ValueKey[]): Pick<Value, ValueKey>;
|
|
3184
3380
|
//#endregion
|
|
3381
|
+
//#region src/value/shake.d.ts
|
|
3382
|
+
type Shaken<Value extends PlainObject> = { [Key in keyof Value]: Value[Key] extends undefined ? never : Value[Key] };
|
|
3383
|
+
declare function shake<Value extends PlainObject>(value: Value): Shaken<Value>;
|
|
3384
|
+
//#endregion
|
|
3185
3385
|
//#region src/value/smush.d.ts
|
|
3186
3386
|
type Smushed<Value extends PlainObject> = Simplify<{ [NestedKey in NestedKeys<Value>]: NestedValue<Value, ToString<NestedKey>> }>;
|
|
3187
3387
|
/**
|
|
@@ -3213,16 +3413,29 @@ declare function unsmush<Value extends PlainObject>(value: Value): Unsmushed<Val
|
|
|
3213
3413
|
* Options for merging values
|
|
3214
3414
|
*/
|
|
3215
3415
|
type MergeOptions = {
|
|
3416
|
+
/**
|
|
3417
|
+
* Assign values to the first array or object instead of creating a new one?
|
|
3418
|
+
*/
|
|
3419
|
+
assignValues?: boolean;
|
|
3216
3420
|
/**
|
|
3217
3421
|
* Key _(or key epxressions)_ for values that should be replaced
|
|
3422
|
+
*
|
|
3218
3423
|
* ```ts
|
|
3219
3424
|
* merge([{items: [1, 2, 3]}, {items: [99]}]); // {items: [99]}
|
|
3220
3425
|
* ```
|
|
3221
3426
|
*/
|
|
3222
3427
|
replaceableObjects?: string | RegExp | Array<string | RegExp>;
|
|
3428
|
+
/**
|
|
3429
|
+
* Skip nullable values when merging objects?
|
|
3430
|
+
*
|
|
3431
|
+
* ```ts
|
|
3432
|
+
* merge({a: 1, b: 2}, {b: null, c: 3}, {d: null}); // {a: 1, b: 2, c: 3}
|
|
3433
|
+
* ```
|
|
3434
|
+
*/
|
|
3223
3435
|
skipNullableAny?: boolean;
|
|
3224
3436
|
/**
|
|
3225
3437
|
* Skip nullable values when merging arrays?
|
|
3438
|
+
*
|
|
3226
3439
|
* ```ts
|
|
3227
3440
|
* merge([1, 2, 3], [null, null, 99]); // [1, 2, 99]
|
|
3228
3441
|
* ```
|
|
@@ -3645,7 +3858,7 @@ declare function isInstanceOf<Instance>(constructor: Constructor<Instance>, valu
|
|
|
3645
3858
|
* @param value Value to check
|
|
3646
3859
|
* @returns `true` if the value is a `Key` _(`number` or `string`)_, otherwise `false`
|
|
3647
3860
|
*/
|
|
3648
|
-
declare function isKey(value: unknown): value is Key;
|
|
3861
|
+
declare function isKey(value: unknown): value is Key$1;
|
|
3649
3862
|
/**
|
|
3650
3863
|
* Is the value not an array or a plain object?
|
|
3651
3864
|
* @param value Value to check
|
|
@@ -3670,7 +3883,7 @@ declare function isNonInstanceOf<Instance, Value>(constructor: Constructor<Insta
|
|
|
3670
3883
|
* @param value Value to check
|
|
3671
3884
|
* @returns `true` if the value is not a `Key` _(`number` or `string`)_, otherwise `false`
|
|
3672
3885
|
*/
|
|
3673
|
-
declare function isNonKey<Value>(value: Value): value is Exclude<Value, Key>;
|
|
3886
|
+
declare function isNonKey<Value>(value: Value): value is Exclude<Value, Key$1>;
|
|
3674
3887
|
/**
|
|
3675
3888
|
* Is the value not a number?
|
|
3676
3889
|
* @param value Value to check
|
|
@@ -5106,4 +5319,4 @@ declare class SizedSet<Value = unknown> extends Set<Value> {
|
|
|
5106
5319
|
get(value: Value, update?: boolean): Value | undefined;
|
|
5107
5320
|
}
|
|
5108
5321
|
//#endregion
|
|
5109
|
-
export { AnyResult, ArrayComparisonSorter, ArrayKeySorter, ArrayOrPlainObject, ArrayPosition, ArrayValueSorter, Asserter, AsyncCancelableCallback, AttemptFlow, AttemptFlowPromise, type Beacon, type BeaconOptions, BuiltIns, CancelableCallback, CancelablePromise, type Color, Constructor, DiffOptions, DiffResult, DiffValue, EqualOptions, Err, EventPosition, ExtendedErr, ExtendedResult, Flow, FlowPromise, FulfilledPromise, FuzzyConfiguration, FuzzyOptions, FuzzyResult, FuzzySearchOptions, GenericAsyncCallback, GenericCallback, type HSLAColor, type HSLColor, Key, KeyedValue, type Logger, type Memoized, type MemoizedOptions, MergeOptions, Merger, NestedArray, NestedKeys, NestedPartial, NestedValue, NestedValues, NumericalKeys, NumericalValues, type Observable, type Observer, Ok, OnceAsyncCallback, OnceCallback, PROMISE_ABORT_EVENT, PROMISE_ABORT_OPTIONS, PROMISE_ERROR_NAME, PROMISE_MESSAGE_EXPECTATION_ATTEMPT, PROMISE_MESSAGE_EXPECTATION_RESULT, PROMISE_MESSAGE_EXPECTATION_TIMED, PROMISE_MESSAGE_TIMEOUT, PROMISE_STRATEGY_ALL, PROMISE_STRATEGY_DEFAULT, PROMISE_TYPE_FULFILLED, PROMISE_TYPE_REJECTED, PlainObject, Primitive, PromiseData, PromiseHandlers, PromiseOptions, PromiseParameters, PromiseStrategy, PromiseTimeoutError, PromisesItems, PromisesOptions, PromisesResult, PromisesUnwrapped, PromisesValue, PromisesValues, type Queue, QueueError, type QueueOptions, type Queued, type QueuedResult, type RGBAColor, type RGBColor, RejectedPromise, RequiredKeys, Result, ResultMatch, RetryError, RetryOptions, SORT_DIRECTION_ASCENDING, SORT_DIRECTION_DESCENDING, Simplify, SizedMap, SizedSet, Smushed, SortDirection, Sorter, type Subscription, TemplateOptions, type Time, ToString, TypedArray, Unsmushed, UnwrapValue, assert, assertCondition, assertDefined, assertInstanceOf, assertIs, asyncAttempt, asyncDebounce, asyncFlow, asyncMatchResult, asyncOnce, asyncPipe, asyncThrottle, attempt, attemptAsyncFlow, attemptAsyncPipe, attemptFlow, attemptPipe, attemptPromise, average, beacon, between, camelCase, cancelable, capitalize, ceil, chunk, clamp, clone, compact, compare, count, debounce, dedent, delay, deregisterCloner, deregisterComparator, deregisterEqualizer, diff, difference, drop, endsWith, endsWithArray, equal, error, exclude, exists, filter, find, first, firstOrDefault, flatten, floor, flow, fromQuery, toPromise as fromResult, toPromise, fuzzy, fuzzyMatch, getArray, getArrayPosition, getColor, getError, getForegroundColor, getHexColor, getHexaColor, getHslColor, getHslaColor, getNormalizedHex, getNumber, getRandomBoolean, getRandomCharacters, getRandomColor, getRandomFloat, getRandomHex, getRandomInteger, getRandomItem, getRandomItems, getRgbColor, getRgbaColor, getSortedIndex, getString, getTimedPromise, getUuid, getValue, groupArraysBy, groupBy, handleResult, hasValue, hexToHsl, hexToHsla, hexToRgb, hexToRgba, hslToHex, hslToRgb, hslToRgba, ignoreKey, inMap, inSet, includes, includesArray, indexOf, indexOfArray, initializeEqualizer, initializeMerger, initializeSorter, initializeTemplater, insert, intersection, isArrayOrPlainObject, isColor, isConstructor, isEmpty, isError, isFulfilled, isHexColor, isHslColor, isHslLike, isHslaColor, isInstanceOf, isKey, isNonArrayOrPlainObject, isNonConstructor, isNonEmpty, isNonInstanceOf, isNonKey, isNonNullable, isNonNullableOrEmpty, isNonNullableOrWhitespace, isNonNumber, isNonNumerical, isNonObject, isNonPlainObject, isNonPrimitive, isNonTypedArray, isNullable, isNullableOrEmpty, isNullableOrWhitespace, isNumber, isNumerical, isObject, isOk, isPlainObject, isPrimitive, isRejected, isResult, isRgbColor, isRgbLike, isRgbaColor, isSorted, isTypedArray, join, kebabCase, last, lastOrDefault, logger, lowerCase, matchResult, max, median, memoize, merge, min, move, moveIndices, moveToIndex, noop, ok, omit, once, parse, partition, pascalCase, pick, pipe, promises, push, queue, range, registerCloner, registerComparator, registerEqualizer, resultPromises, retry, reverse, rgbToHex, rgbToHsl, rgbToHsla, round, select, setValue, settlePromise, shuffle, single, slice, smush, snakeCase, sort, splice, startsWith, startsWithArray, sum, swap, take, template, throttle, timed, times, titleCase, toMap, toMapArrays, toQuery, toRecord, toRecordArrays, toResult, toSet, toggle, trim, truncate, tryDecode, tryEncode, union, unique, unsmush, unwrap, update, upperCase, words };
|
|
5322
|
+
export { AnyResult, ArrayComparisonSorter, ArrayKeySorter, ArrayOrPlainObject, ArrayPosition, ArrayValueSorter, Asserter, AsyncCancelableCallback, AttemptFlow, AttemptFlowPromise, type Beacon, type BeaconOptions, BuiltIns, CancelableCallback, CancelablePromise, type Color, Constructor, DiffOptions, DiffResult, DiffValue, EqualOptions, Err, EventPosition, type Events, ExtendedErr, ExtendedResult, Flow, FlowPromise, FulfilledPromise, FuzzyConfiguration, FuzzyOptions, FuzzyResult, FuzzySearchOptions, GenericAsyncCallback, GenericCallback, type HSLAColor, type HSLColor, type Kalas, Key$1 as Key, KeyedValue, type Logger, type Memoized, type MemoizedOptions, MergeOptions, Merger, NestedArray, NestedKeys, NestedPartial, NestedValue, NestedValues, NormalizeOptions, Normalizer, NumericalKeys, NumericalValues, type Observable, type Observer, Ok, OnceAsyncCallback, OnceCallback, PROMISE_ABORT_EVENT, PROMISE_ABORT_OPTIONS, PROMISE_ERROR_NAME, PROMISE_MESSAGE_EXPECTATION_ATTEMPT, PROMISE_MESSAGE_EXPECTATION_RESULT, PROMISE_MESSAGE_EXPECTATION_TIMED, PROMISE_MESSAGE_TIMEOUT, PROMISE_STRATEGY_ALL, PROMISE_STRATEGY_DEFAULT, PROMISE_TYPE_FULFILLED, PROMISE_TYPE_REJECTED, PlainObject, Primitive, PromiseData, PromiseHandlers, PromiseOptions, PromiseParameters, PromiseStrategy, PromiseTimeoutError, PromisesItems, PromisesOptions, PromisesResult, PromisesUnwrapped, PromisesValue, PromisesValues, type Queue, QueueError, type QueueOptions, type Queued, type QueuedResult, type RGBAColor, type RGBColor, RejectedPromise, RequiredKeys, Result, ResultMatch, RetryError, RetryOptions, SORT_DIRECTION_ASCENDING, SORT_DIRECTION_DESCENDING, Shaken, Simplify, SizedMap, SizedSet, Smushed, SortDirection, Sorter, type Subscription, TemplateOptions, type Time, ToString, TypedArray, Unsmushed, Unsubscriber, UnwrapValue, assert, assertCondition, assertDefined, assertInstanceOf, assertIs, asyncAttempt, asyncDebounce, asyncFlow, asyncMatchResult, asyncOnce, asyncPipe, asyncThrottle, attempt, attemptAsyncFlow, attemptAsyncPipe, attemptFlow, attemptPipe, attemptPromise, average, beacon, between, camelCase, cancelable, capitalize, ceil, chunk, clamp, clone, compact, compare, count, debounce, deburr, dedent, delay, deregisterCloner, deregisterComparator, deregisterEqualizer, diff, difference, drop, endsWith, endsWithArray, equal, error, exclude, exists, filter, find, findLast, first, firstOrDefault, flatten, floor, flow, fromQuery, toPromise as fromResult, toPromise, fuzzy, fuzzyMatch, getArray, getArrayPosition, getColor, getError, getForegroundColor, getHexColor, getHexaColor, getHslColor, getHslaColor, getNormalizedHex, getNumber, getRandomBoolean, getRandomCharacters, getRandomColor, getRandomFloat, getRandomHex, getRandomInteger, getRandomItem, getRandomItems, getRgbColor, getRgbaColor, getSortedIndex, getString, getTimedPromise, getUuid, getValue, groupArraysBy, groupBy, handleResult, hasValue, hexToHsl, hexToHsla, hexToRgb, hexToRgba, hslToHex, hslToRgb, hslToRgba, ignoreKey, inMap, inSet, includes, includesArray, indexOf, indexOfArray, initializeEqualizer, initializeMerger, initializeNormalizer, initializeSorter, initializeTemplater, insert, intersection, isArrayOrPlainObject, isColor, isConstructor, isEmpty, isError, isFulfilled, isHexColor, isHslColor, isHslLike, isHslaColor, isInstanceOf, isKey, isNonArrayOrPlainObject, isNonConstructor, isNonEmpty, isNonInstanceOf, isNonKey, isNonNullable, isNonNullableOrEmpty, isNonNullableOrWhitespace, isNonNumber, isNonNumerical, isNonObject, isNonPlainObject, isNonPrimitive, isNonTypedArray, isNullable, isNullableOrEmpty, isNullableOrWhitespace, isNumber, isNumerical, isObject, isOk, isPlainObject, isPrimitive, isRejected, isResult, isRgbColor, isRgbLike, isRgbaColor, isSorted, isTypedArray, join, kalas, kebabCase, last, lastIndexOf, lastOrDefault, logger, lowerCase, matchResult, max, median, memoize, merge, min, move, moveIndices, moveToIndex, noop, normalize, ok, omit, once, parse, partition, pascalCase, pick, pipe, promises, push, queue, range, registerCloner, registerComparator, registerEqualizer, resultPromises, retry, reverse, rgbToHex, rgbToHsl, rgbToHsla, round, select, setValue, settlePromise, shake, shuffle, single, slice, smush, snakeCase, sort, splice, startsWith, startsWithArray, sum, swap, take, template, throttle, timed, times, titleCase, toMap, toMapArrays, toQuery, toRecord, toRecordArrays, toResult, toSet, toggle, trim, truncate, tryDecode, tryEncode, union, unique, unsmush, unwrap, update, upperCase, words };
|