@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/set.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ArrayOrPlainObject, Paths } from '~/models';
|
|
2
2
|
/**
|
|
3
3
|
* - Set the value in an object using a known path
|
|
4
4
|
* - You can set a nested value by using dot notation, e.g., `foo.bar.baz`
|
|
5
5
|
* - If a part of the path does not exist, it will be created, either as an array or a generic object, depending on the path
|
|
6
6
|
* - Returns the original object
|
|
7
7
|
*/
|
|
8
|
-
export declare function setValue<Data extends
|
|
8
|
+
export declare function setValue<Data extends ArrayOrPlainObject, Path extends Paths<Data>>(data: Data, path: Path, value: unknown): Data;
|
|
9
9
|
/**
|
|
10
10
|
* - Set the value in an object using an unknown path
|
|
11
11
|
* - You can set a nested value by using dot notation, e.g., `foo.bar.baz`
|
|
@@ -13,4 +13,4 @@ export declare function setValue<Data extends PlainObject, Path extends Paths<Da
|
|
|
13
13
|
* - If `ignoreCase` is `true`, path matching will be case-insensitive
|
|
14
14
|
* - Returns the original object
|
|
15
15
|
*/
|
|
16
|
-
export declare function setValue<Data extends
|
|
16
|
+
export declare function setValue<Data extends ArrayOrPlainObject>(data: Data, path: string, value: unknown, ignoreCase?: boolean): Data;
|