@oscarpalmer/atoms 0.117.0 → 0.119.0

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 (63) hide show
  1. package/dist/array/get.js +1 -0
  2. package/dist/array/sort.js +0 -1
  3. package/dist/atoms.full.js +255 -170
  4. package/dist/beacon.js +45 -33
  5. package/dist/color/misc/get.js +6 -2
  6. package/dist/function.js +29 -39
  7. package/dist/index.js +4 -3
  8. package/dist/internal/array/chunk.js +2 -2
  9. package/dist/internal/array/compact.js +2 -2
  10. package/dist/internal/array/insert.js +3 -3
  11. package/dist/internal/frame-rate.js +5 -9
  12. package/dist/internal/math/aggregate.js +6 -2
  13. package/dist/internal/random.js +6 -3
  14. package/dist/internal/value/equal.js +6 -2
  15. package/dist/is.js +4 -1
  16. package/dist/logger.js +19 -8
  17. package/dist/math.js +3 -5
  18. package/dist/string/case.js +36 -10
  19. package/dist/string/index.js +2 -2
  20. package/dist/string/misc.js +20 -9
  21. package/dist/string/template.js +24 -7
  22. package/dist/value/merge.js +10 -4
  23. package/dist/value/partial.js +1 -1
  24. package/dist/value/smush.js +11 -5
  25. package/package.json +6 -6
  26. package/src/array/get.ts +4 -0
  27. package/src/array/sort.ts +1 -1
  28. package/src/beacon.ts +86 -39
  29. package/src/color/misc/get.ts +6 -3
  30. package/src/function.ts +59 -54
  31. package/src/internal/array/chunk.ts +3 -4
  32. package/src/internal/array/compact.ts +6 -3
  33. package/src/internal/array/insert.ts +9 -6
  34. package/src/internal/frame-rate.ts +9 -13
  35. package/src/internal/is.ts +1 -1
  36. package/src/internal/math/aggregate.ts +14 -11
  37. package/src/internal/random.ts +13 -9
  38. package/src/internal/value/equal.ts +46 -19
  39. package/src/is.ts +15 -6
  40. package/src/logger.ts +38 -19
  41. package/src/math.ts +9 -12
  42. package/src/models.ts +38 -26
  43. package/src/query.ts +1 -1
  44. package/src/sized.ts +2 -2
  45. package/src/string/case.ts +66 -12
  46. package/src/string/misc.ts +33 -13
  47. package/src/string/template.ts +59 -18
  48. package/src/value/merge.ts +47 -15
  49. package/src/value/partial.ts +3 -1
  50. package/src/value/smush.ts +13 -4
  51. package/types/beacon.d.ts +14 -3
  52. package/types/function.d.ts +17 -3
  53. package/types/internal/array/chunk.d.ts +1 -1
  54. package/types/internal/frame-rate.d.ts +1 -1
  55. package/types/internal/math/aggregate.d.ts +4 -9
  56. package/types/internal/value/equal.d.ts +27 -11
  57. package/types/is.d.ts +5 -5
  58. package/types/logger.d.ts +4 -3
  59. package/types/math.d.ts +6 -6
  60. package/types/models.d.ts +19 -4
  61. package/types/string/misc.d.ts +6 -0
  62. package/types/string/template.d.ts +20 -3
  63. package/types/value/merge.d.ts +19 -3
package/dist/array/get.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { isPlainObject } from "../internal/is.js";
2
2
  function getArray(value, indiced) {
3
3
  if (Array.isArray(value)) return value;
4
+ if (value instanceof Map || value instanceof Set) return [...value.values()];
4
5
  if (!isPlainObject(value)) return [value];
5
6
  if (indiced !== true) return Object.values(value);
6
7
  const keys = Object.keys(value);
@@ -1,6 +1,5 @@
1
1
  import { isPlainObject } from "../internal/is.js";
2
2
  import { compare } from "../internal/value/compare.js";
3
- import "../is.js";
4
3
  function getCallback(value, key, forObject) {
5
4
  if (key != null) return;
6
5
  if (forObject && typeof value.value === "function") return value.value;