@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
package/types/value/get.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { ToString } from 'type-fest/source/internal/string';
|
|
2
|
-
import type { Get, Paths
|
|
2
|
+
import type { ArrayOrPlainObject, Get, Paths } from '~/models';
|
|
3
3
|
/**
|
|
4
4
|
* - Get the value from an object using a known path
|
|
5
5
|
* - You can retrieve a nested value by using dot notation, e.g., `foo.bar.baz`
|
|
6
6
|
* - Returns `undefined` if the value is not found
|
|
7
7
|
*/
|
|
8
|
-
export declare function getValue<Data extends
|
|
8
|
+
export declare function getValue<Data extends ArrayOrPlainObject, Path extends Paths<Data>>(data: Data, path: Path): Get<Data, ToString<Path>>;
|
|
9
9
|
/**
|
|
10
10
|
* - Get the value from an object using an unknown path
|
|
11
11
|
* - You can retrieve a nested value by using dot notation, e.g., `foo.bar.baz`
|
|
12
12
|
* - If `ignoreCase` is `true`, path matching will be case-insensitive
|
|
13
13
|
* - Returns `undefined` if the value is not found
|
|
14
14
|
*/
|
|
15
|
-
export declare function getValue<Data extends
|
|
15
|
+
export declare function getValue<Data extends ArrayOrPlainObject>(data: Data, path: string, ignoreCase?: boolean): unknown;
|