@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.
Files changed (54) hide show
  1. package/dist/js/array/chunk.cjs +1 -1
  2. package/dist/js/array/chunk.js +1 -1
  3. package/dist/js/value/equal.cjs +4 -1
  4. package/dist/js/value/equal.js +4 -1
  5. package/package.json +1 -1
  6. package/src/js/array/chunk.ts +1 -1
  7. package/src/js/array/count.ts +6 -6
  8. package/src/js/array/exists.ts +6 -6
  9. package/src/js/array/filter.ts +6 -6
  10. package/src/js/array/find.ts +6 -6
  11. package/src/js/array/group-by.ts +67 -55
  12. package/src/js/array/index-of.ts +6 -6
  13. package/src/js/array/sort.ts +20 -0
  14. package/src/js/array/to-map.ts +55 -47
  15. package/src/js/array/to-record.ts +61 -57
  16. package/src/js/array/unique.ts +6 -6
  17. package/src/js/internal/value/handle.ts +5 -5
  18. package/src/js/value/clone.ts +3 -1
  19. package/src/js/value/equal.ts +4 -1
  20. package/src/js/value/get.ts +9 -9
  21. package/src/js/value/set.ts +10 -11
  22. package/types/array/count.d.cts +34 -2
  23. package/types/array/count.d.ts +3 -3
  24. package/types/array/exists.d.cts +34 -2
  25. package/types/array/exists.d.ts +3 -3
  26. package/types/array/filter.d.cts +34 -2
  27. package/types/array/filter.d.ts +3 -3
  28. package/types/array/find.d.cts +34 -2
  29. package/types/array/find.d.ts +3 -3
  30. package/types/array/group-by.d.cts +44 -12
  31. package/types/array/group-by.d.ts +14 -14
  32. package/types/array/index-of.d.cts +34 -2
  33. package/types/array/index-of.d.ts +3 -3
  34. package/types/array/index.d.cts +88 -46
  35. package/types/array/sort.d.cts +42 -0
  36. package/types/array/sort.d.ts +11 -1
  37. package/types/array/to-map.d.cts +42 -10
  38. package/types/array/to-map.d.ts +13 -13
  39. package/types/array/to-record.d.cts +44 -12
  40. package/types/array/to-record.d.ts +13 -13
  41. package/types/array/unique.d.cts +34 -2
  42. package/types/array/unique.d.ts +3 -3
  43. package/types/index.d.cts +1034 -317
  44. package/types/internal/value/handle.d.cts +27 -2
  45. package/types/internal/value/handle.d.ts +2 -2
  46. package/types/models.d.cts +467 -210
  47. package/types/value/clone.d.cts +1 -1
  48. package/types/value/clone.d.ts +1 -1
  49. package/types/value/get.d.cts +470 -211
  50. package/types/value/get.d.ts +3 -3
  51. package/types/value/index.d.cts +515 -224
  52. package/types/value/set.d.cts +357 -170
  53. package/types/value/set.d.ts +3 -3
  54. package/types/value/smush.d.cts +463 -209
@@ -1,15 +1,15 @@
1
1
  import type { ToString } from 'type-fest/source/internal/string';
2
- import type { Get, Paths, PlainObject } from '~/models';
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 PlainObject, Path extends Paths<Data>>(data: Data, path: Path): Get<Data, ToString<Path>>;
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 PlainObject>(data: Data, path: string, ignoreCase?: boolean): unknown;
15
+ export declare function getValue<Data extends ArrayOrPlainObject>(data: Data, path: string, ignoreCase?: boolean): unknown;