@oscarpalmer/atoms 0.77.0 → 0.77.2
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/js/array/chunk.cjs +1 -1
- package/dist/js/array/chunk.js +1 -1
- package/dist/js/value/equal.cjs +4 -1
- package/dist/js/value/equal.js +4 -1
- package/package.json +1 -1
- package/src/js/array/chunk.ts +1 -1
- package/src/js/array/count.ts +6 -6
- package/src/js/array/exists.ts +6 -6
- package/src/js/array/filter.ts +6 -6
- package/src/js/array/find.ts +6 -6
- package/src/js/array/group-by.ts +67 -55
- package/src/js/array/index-of.ts +6 -6
- package/src/js/array/sort.ts +20 -0
- package/src/js/array/to-map.ts +55 -47
- package/src/js/array/to-record.ts +61 -57
- package/src/js/array/unique.ts +6 -6
- package/src/js/internal/value/handle.ts +5 -5
- package/src/js/value/clone.ts +3 -1
- package/src/js/value/equal.ts +4 -1
- package/src/js/value/get.ts +9 -9
- package/src/js/value/set.ts +10 -11
- package/types/array/count.d.cts +34 -2
- package/types/array/count.d.ts +3 -3
- package/types/array/exists.d.cts +34 -2
- package/types/array/exists.d.ts +3 -3
- package/types/array/filter.d.cts +34 -2
- package/types/array/filter.d.ts +3 -3
- package/types/array/find.d.cts +34 -2
- package/types/array/find.d.ts +3 -3
- package/types/array/group-by.d.cts +44 -12
- package/types/array/group-by.d.ts +14 -14
- package/types/array/index-of.d.cts +34 -2
- package/types/array/index-of.d.ts +3 -3
- package/types/array/index.d.cts +88 -46
- package/types/array/sort.d.cts +42 -0
- package/types/array/sort.d.ts +11 -1
- package/types/array/to-map.d.cts +42 -10
- package/types/array/to-map.d.ts +13 -13
- package/types/array/to-record.d.cts +44 -12
- package/types/array/to-record.d.ts +13 -13
- package/types/array/unique.d.cts +34 -2
- package/types/array/unique.d.ts +3 -3
- package/types/index.d.cts +1034 -317
- package/types/internal/value/handle.d.cts +27 -2
- package/types/internal/value/handle.d.ts +2 -2
- package/types/models.d.cts +467 -210
- package/types/value/clone.d.cts +1 -1
- package/types/value/clone.d.ts +1 -1
- package/types/value/get.d.cts +470 -211
- package/types/value/get.d.ts +3 -3
- package/types/value/index.d.cts +515 -224
- package/types/value/set.d.cts +357 -170
- package/types/value/set.d.ts +3 -3
- package/types/value/smush.d.cts +463 -209
|
@@ -31,7 +31,32 @@ isObject('hello');
|
|
|
31
31
|
@category Object
|
|
32
32
|
*/
|
|
33
33
|
export type UnknownRecord = Record<PropertyKey, unknown>;
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
/**
|
|
35
|
+
Represents an array with `unknown` value.
|
|
36
|
+
|
|
37
|
+
Use case: You want a type that all arrays can be assigned to, but you don't care about the value.
|
|
38
|
+
|
|
39
|
+
@example
|
|
40
|
+
```
|
|
41
|
+
import type {UnknownArray} from 'type-fest';
|
|
42
|
+
|
|
43
|
+
type IsArray<T> = T extends UnknownArray ? true : false;
|
|
44
|
+
|
|
45
|
+
type A = IsArray<['foo']>;
|
|
46
|
+
//=> true
|
|
47
|
+
|
|
48
|
+
type B = IsArray<readonly number[]>;
|
|
49
|
+
//=> true
|
|
50
|
+
|
|
51
|
+
type C = IsArray<string>;
|
|
52
|
+
//=> false
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
@category Type
|
|
56
|
+
@category Array
|
|
57
|
+
*/
|
|
58
|
+
export type UnknownArray = readonly unknown[];
|
|
59
|
+
export type ArrayOrPlainObject = UnknownArray | UnknownRecord;
|
|
60
|
+
export declare function handleValue(data: ArrayOrPlainObject, path: string, value: unknown, get: boolean, ignoreCase: boolean): unknown;
|
|
36
61
|
|
|
37
62
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare function handleValue(data:
|
|
1
|
+
import type { ArrayOrPlainObject } from '~/models';
|
|
2
|
+
export declare function handleValue(data: ArrayOrPlainObject, path: string, value: unknown, get: boolean, ignoreCase: boolean): unknown;
|