@rimbu/deep 2.0.1 → 2.0.3

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 (48) hide show
  1. package/README.md +295 -60
  2. package/dist/bun/deep.mts +8 -8
  3. package/dist/bun/match.mts +29 -27
  4. package/dist/bun/patch.mts +11 -10
  5. package/dist/bun/path.mts +98 -100
  6. package/dist/bun/protected.mts +18 -17
  7. package/dist/bun/selector.mts +22 -20
  8. package/dist/bun/tuple.mts +6 -2
  9. package/dist/cjs/deep.cjs +18 -18
  10. package/dist/cjs/deep.cjs.map +1 -1
  11. package/dist/cjs/deep.d.cts +6 -6
  12. package/dist/cjs/match.cjs +2 -3
  13. package/dist/cjs/match.cjs.map +1 -1
  14. package/dist/cjs/match.d.cts +2 -2
  15. package/dist/cjs/patch.cjs +2 -3
  16. package/dist/cjs/patch.cjs.map +1 -1
  17. package/dist/cjs/patch.d.cts +1 -1
  18. package/dist/cjs/path.cjs +5 -5
  19. package/dist/cjs/path.cjs.map +1 -1
  20. package/dist/cjs/path.d.cts +8 -6
  21. package/dist/cjs/selector.cjs +1 -2
  22. package/dist/cjs/selector.cjs.map +1 -1
  23. package/dist/cjs/tuple.cjs +1 -1
  24. package/dist/cjs/tuple.cjs.map +1 -1
  25. package/dist/cjs/tuple.d.cts +5 -1
  26. package/dist/esm/deep.d.mts +6 -6
  27. package/dist/esm/deep.mjs +6 -6
  28. package/dist/esm/match.d.mts +2 -2
  29. package/dist/esm/match.mjs +1 -1
  30. package/dist/esm/match.mjs.map +1 -1
  31. package/dist/esm/patch.d.mts +1 -1
  32. package/dist/esm/patch.mjs +1 -1
  33. package/dist/esm/patch.mjs.map +1 -1
  34. package/dist/esm/path.d.mts +8 -6
  35. package/dist/esm/path.mjs +2 -2
  36. package/dist/esm/path.mjs.map +1 -1
  37. package/dist/esm/selector.mjs.map +1 -1
  38. package/dist/esm/tuple.d.mts +5 -1
  39. package/dist/esm/tuple.mjs +1 -1
  40. package/dist/esm/tuple.mjs.map +1 -1
  41. package/package.json +7 -7
  42. package/src/deep.mts +8 -8
  43. package/src/match.mts +29 -27
  44. package/src/patch.mts +11 -10
  45. package/src/path.mts +98 -100
  46. package/src/protected.mts +18 -17
  47. package/src/selector.mts +22 -20
  48. package/src/tuple.mts +6 -2
package/src/tuple.mts CHANGED
@@ -17,6 +17,10 @@ export namespace Tuple {
17
17
  */
18
18
  export type Source = readonly unknown[];
19
19
 
20
+ /**
21
+ * Determines whether the given type `T` is a tuple type.
22
+ * @typeparam T - the input type
23
+ */
20
24
  export type IsTuple<T> = T extends { length: infer L }
21
25
  ? 0 extends L
22
26
  ? false
@@ -43,7 +47,7 @@ export namespace Tuple {
43
47
  }
44
48
 
45
49
  /**
46
- * Returns the item at the given `index` in the givn `tuple`.
50
+ * Returns the item at the given `index` in the given `tuple`.
47
51
  * @param tuple - the tuple to get the item from
48
52
  * @param index - the index in of the tuple element
49
53
  * @example
@@ -138,7 +142,7 @@ export namespace Tuple {
138
142
  */
139
143
  export function append<
140
144
  T extends Tuple.Source,
141
- V extends readonly [unknown, ...unknown[]]
145
+ V extends readonly [unknown, ...unknown[]],
142
146
  >(tuple: T, ...values: V): readonly [...T, ...V] {
143
147
  return [...tuple, ...values];
144
148
  }