yummies 7.19.3 → 7.20.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 (162) hide show
  1. package/assert.cjs +1 -1
  2. package/assert.cjs.map +1 -1
  3. package/assert.js +1 -1
  4. package/assert.js.map +1 -1
  5. package/async.cjs +147 -137
  6. package/async.cjs.map +1 -1
  7. package/async.d.ts +98 -131
  8. package/async.js +147 -137
  9. package/async.js.map +1 -1
  10. package/common.cjs +3 -1
  11. package/common.cjs.map +1 -1
  12. package/common.d.ts +18 -24
  13. package/common.js +3 -1
  14. package/common.js.map +1 -1
  15. package/complex.cjs +1 -0
  16. package/complex.cjs.map +1 -1
  17. package/complex.js +1 -0
  18. package/complex.js.map +1 -1
  19. package/cookie.cjs +1 -1
  20. package/cookie.cjs.map +1 -1
  21. package/cookie.d.ts +0 -18
  22. package/cookie.js +1 -1
  23. package/cookie.js.map +1 -1
  24. package/css-cx.cjs +78 -0
  25. package/css-cx.cjs.map +1 -0
  26. package/css-cx.d.ts +69 -0
  27. package/css-cx.js +74 -0
  28. package/css-cx.js.map +1 -0
  29. package/css.cjs +32 -111
  30. package/css.cjs.map +1 -1
  31. package/css.d.ts +32 -42
  32. package/css.js +30 -107
  33. package/css.js.map +1 -1
  34. package/data.cjs +60 -50
  35. package/data.cjs.map +1 -1
  36. package/data.d.ts +21 -34
  37. package/data.js +60 -50
  38. package/data.js.map +1 -1
  39. package/date-time.cjs +104 -98
  40. package/date-time.cjs.map +1 -1
  41. package/date-time.d.ts +51 -57
  42. package/date-time.js +104 -97
  43. package/date-time.js.map +1 -1
  44. package/device.cjs +14 -19
  45. package/device.cjs.map +1 -1
  46. package/device.d.ts +15 -26
  47. package/device.js +14 -19
  48. package/device.js.map +1 -1
  49. package/encodings.cjs +1 -1
  50. package/encodings.cjs.map +1 -1
  51. package/encodings.d.ts +0 -17
  52. package/encodings.js +1 -1
  53. package/encodings.js.map +1 -1
  54. package/errors.cjs +1 -18
  55. package/errors.cjs.map +1 -1
  56. package/errors.d.ts +0 -17
  57. package/errors.js +1 -17
  58. package/errors.js.map +1 -1
  59. package/file.cjs +3 -17
  60. package/file.cjs.map +1 -1
  61. package/file.d.ts +1 -16
  62. package/file.js +3 -17
  63. package/file.js.map +1 -1
  64. package/format.cjs +1 -1
  65. package/format.cjs.map +1 -1
  66. package/format.js +1 -1
  67. package/format.js.map +1 -1
  68. package/html.cjs +113 -173
  69. package/html.cjs.map +1 -1
  70. package/html.d.ts +68 -58
  71. package/html.js +112 -170
  72. package/html.js.map +1 -1
  73. package/id-nanoid.cjs +36 -0
  74. package/id-nanoid.cjs.map +1 -0
  75. package/id-nanoid.d.ts +26 -0
  76. package/id-nanoid.js +32 -0
  77. package/id-nanoid.js.map +1 -0
  78. package/id.cjs +10 -45
  79. package/id.cjs.map +1 -1
  80. package/id.d.ts +27 -36
  81. package/id.js +6 -40
  82. package/id.js.map +1 -1
  83. package/imports.cjs +3 -18
  84. package/imports.cjs.map +1 -1
  85. package/imports.d.ts +1 -16
  86. package/imports.js +3 -17
  87. package/imports.js.map +1 -1
  88. package/math.cjs +16 -12
  89. package/math.cjs.map +1 -1
  90. package/math.d.ts +9 -24
  91. package/math.js +16 -12
  92. package/math.js.map +1 -1
  93. package/media.cjs +88 -89
  94. package/media.cjs.map +1 -1
  95. package/media.d.ts +72 -80
  96. package/media.js +88 -88
  97. package/media.js.map +1 -1
  98. package/mobx.cjs +0 -1
  99. package/mobx.cjs.map +1 -1
  100. package/mobx.js.map +1 -1
  101. package/ms.cjs +3 -17
  102. package/ms.cjs.map +1 -1
  103. package/ms.d.ts +1 -16
  104. package/ms.js +3 -17
  105. package/ms.js.map +1 -1
  106. package/number.cjs +1 -17
  107. package/number.cjs.map +1 -1
  108. package/number.d.ts +0 -16
  109. package/number.js +1 -17
  110. package/number.js.map +1 -1
  111. package/package.json +6 -6
  112. package/parser.cjs +1 -1
  113. package/parser.cjs.map +1 -1
  114. package/parser.js +1 -1
  115. package/parser.js.map +1 -1
  116. package/price.cjs +1 -1
  117. package/price.cjs.map +1 -1
  118. package/price.d.ts +0 -16
  119. package/price.js +1 -1
  120. package/price.js.map +1 -1
  121. package/random.cjs +37 -39
  122. package/random.cjs.map +1 -1
  123. package/random.d.ts +31 -40
  124. package/random.js +37 -39
  125. package/random.js.map +1 -1
  126. package/react.cjs +0 -1
  127. package/react.cjs.map +1 -1
  128. package/react.js.map +1 -1
  129. package/sanitize-html.cjs +82 -0
  130. package/sanitize-html.cjs.map +1 -0
  131. package/sanitize-html.d.ts +28 -0
  132. package/sanitize-html.js +79 -0
  133. package/sanitize-html.js.map +1 -0
  134. package/sound.cjs +1 -17
  135. package/sound.cjs.map +1 -1
  136. package/sound.d.ts +0 -16
  137. package/sound.js +1 -17
  138. package/sound.js.map +1 -1
  139. package/storage.cjs +7 -5
  140. package/storage.cjs.map +1 -1
  141. package/storage.d.ts +3 -17
  142. package/storage.js +7 -5
  143. package/storage.js.map +1 -1
  144. package/text.cjs +3 -17
  145. package/text.cjs.map +1 -1
  146. package/text.d.ts +1 -16
  147. package/text.js +3 -17
  148. package/text.js.map +1 -1
  149. package/type-guard.cjs +38 -1
  150. package/type-guard.cjs.map +1 -1
  151. package/type-guard.d.ts +38 -0
  152. package/type-guard.js +38 -1
  153. package/type-guard.js.map +1 -1
  154. package/types.d.ts +10 -1
  155. package/types.global.d.ts +9 -0
  156. package/vibrate.cjs +1 -17
  157. package/vibrate.cjs.map +1 -1
  158. package/vibrate.d.ts +0 -16
  159. package/vibrate.js +1 -17
  160. package/vibrate.js.map +1 -1
  161. /package/{chunk-pbuEa-1d.js → chunk-D7D4PA-g.js} +0 -0
  162. /package/{chunk-CZWwpsFl.cjs → chunk-DakpK96I.cjs} +0 -0
package/data.cjs CHANGED
@@ -1,5 +1,42 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- //#region src/data.ts
2
+ //#region src/data/flat-map-deep.ts
3
+ /**
4
+ * Recursively flattens a nested array and maps the collected values.
5
+ *
6
+ * @example
7
+ * ```ts
8
+ * flatMapDeep([1, [2, [3]]], (value) => value * 2); // [2, 4, 6]
9
+ * ```
10
+ */
11
+ var flatMapDeep = (arr, fn) => {
12
+ const source = [];
13
+ const collect = (value) => {
14
+ if (!Array.isArray(value)) {
15
+ source.push(value);
16
+ return;
17
+ }
18
+ for (const item of value) collect(item);
19
+ };
20
+ collect(arr);
21
+ return source.map((value, i) => fn(value, i, source));
22
+ };
23
+ //#endregion
24
+ //#region src/data/has-enumerable-keys.ts
25
+ /**
26
+ * Checks whether an object has at least one enumerable key.
27
+ *
28
+ * @example
29
+ * ```ts
30
+ * hasEnumerableKeys({ id: 1 }); // true
31
+ * hasEnumerableKeys({}); // false
32
+ * ```
33
+ */
34
+ var hasEnumerableKeys = (input) => {
35
+ for (const _key in input) return true;
36
+ return false;
37
+ };
38
+ //#endregion
39
+ //#region src/data/is-shallow-equal.ts
3
40
  /**
4
41
  * Performs a shallow comparison for arrays, plain objects, dates and regular expressions.
5
42
  *
@@ -30,50 +67,23 @@ var isShallowEqual = (a, b) => {
30
67
  for (const key of aKeys) if (!Object.hasOwn(bObj, key) || a[key] !== bObj[key]) return false;
31
68
  return true;
32
69
  };
70
+ //#endregion
71
+ //#region src/data/is-unsafe-property.ts
72
+ var UNSAFE_PROPERTY_KEYS = new Set([
73
+ "__proto__",
74
+ "prototype",
75
+ "constructor"
76
+ ]);
33
77
  /**
34
- * Checks whether an object has at least one enumerable key.
35
- *
36
- * @example
37
- * ```ts
38
- * hasEnumerableKeys({ id: 1 }); // true
39
- * hasEnumerableKeys({}); // false
40
- * ```
41
- */
42
- var hasEnumerableKeys = (input) => {
43
- for (const _key in input) return true;
44
- return false;
45
- };
46
- /**
47
- * Wraps a value in an array when it is not already an array.
48
- *
49
- * @example
50
- * ```ts
51
- * toArray('item'); // ['item']
52
- * ```
53
- */
54
- var toArray = (value) => {
55
- return Array.isArray(value) ? value : [value];
56
- };
57
- /**
58
- * Recursively flattens a nested array and maps the collected values.
78
+ * Checks whether a property key is unsafe and can lead to prototype pollution.
59
79
  *
60
80
  * @example
61
- * ```ts
62
- * flatMapDeep([1, [2, [3]]], (value) => value * 2); // [2, 4, 6]
63
- * ```
81
+ * isUnsafeProperty('__proto__'); // true
82
+ * isUnsafeProperty('name'); // false
64
83
  */
65
- var flatMapDeep = (arr, fn) => {
66
- const source = [];
67
- const collect = (value) => {
68
- if (!Array.isArray(value)) {
69
- source.push(value);
70
- return;
71
- }
72
- for (const item of value) collect(item);
73
- };
74
- collect(arr);
75
- return source.map((value, i) => fn(value, i, source));
76
- };
84
+ var isUnsafeProperty = (key) => UNSAFE_PROPERTY_KEYS.has(key);
85
+ //#endregion
86
+ //#region src/data/safe-json-parse.ts
77
87
  /**
78
88
  * Parses JSON safely and returns a fallback value when parsing fails.
79
89
  *
@@ -90,19 +100,19 @@ var safeJsonParse = (json, fallback = null) => {
90
100
  return fallback;
91
101
  }
92
102
  };
93
- var UNSAFE_PROPERTY_KEYS = new Set([
94
- "__proto__",
95
- "prototype",
96
- "constructor"
97
- ]);
103
+ //#endregion
104
+ //#region src/data/to-array.ts
98
105
  /**
99
- * Checks whether a property key is unsafe and can lead to prototype pollution.
106
+ * Wraps a value in an array when it is not already an array.
100
107
  *
101
108
  * @example
102
- * isUnsafeProperty('__proto__'); // true
103
- * isUnsafeProperty('name'); // false
109
+ * ```ts
110
+ * toArray('item'); // ['item']
111
+ * ```
104
112
  */
105
- var isUnsafeProperty = (key) => UNSAFE_PROPERTY_KEYS.has(key);
113
+ var toArray = (value) => {
114
+ return Array.isArray(value) ? value : [value];
115
+ };
106
116
  //#endregion
107
117
  exports.flatMapDeep = flatMapDeep;
108
118
  exports.hasEnumerableKeys = hasEnumerableKeys;
package/data.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"data.cjs","names":[],"sources":["../src/data.ts"],"sourcesContent":["/**\n * ---header-docs-section---\n * # yummies/data\n *\n * ## Description\n *\n * General-purpose data helpers: shallow equality, normalizing values to arrays, and recursive\n * `flatMap`-style transforms. They complement `Array`/`Object` builtins when you need stable\n * comparisons for memoization or small structural utilities without pulling a large lodash-style\n * dependency into the bundle.\n *\n * ## Usage\n *\n * ```ts\n * import { isShallowEqual, toArray } from \"yummies/data\";\n * ```\n */\n\nimport type { AnyObject, Maybe } from 'yummies/types';\n\n/**\n * Performs a shallow comparison for arrays, plain objects, dates and regular expressions.\n *\n * @example\n * ```ts\n * isShallowEqual({ id: 1 }, { id: 1 }); // true\n * ```\n */\nexport const isShallowEqual = (a: unknown, b: unknown): boolean => {\n if (a === b) return true;\n\n if (\n typeof a !== 'object' ||\n typeof b !== 'object' ||\n a === null ||\n b === null\n ) {\n return false;\n }\n\n if (a.constructor !== b.constructor) return false;\n\n const isArrayA = Array.isArray(a);\n\n if (isArrayA !== Array.isArray(b)) return false;\n\n if (isArrayA) {\n const arrA = a as unknown[];\n const arrB = b as unknown[];\n if (arrA.length !== arrB.length) return false;\n\n for (const [i, element] of arrA.entries()) {\n if (element !== arrB[i]) return false;\n }\n return true;\n }\n\n if (a instanceof Date) return a.getTime() === (b as Date).getTime();\n\n if (a instanceof RegExp) return a.toString() === (b as RegExp).toString();\n\n const aKeys = Object.keys(a);\n const bKeys = Object.keys(b);\n\n if (aKeys.length !== bKeys.length) return false;\n\n const bObj = b as AnyObject;\n for (const key of aKeys) {\n if (!Object.hasOwn(bObj, key) || (a as AnyObject)[key] !== bObj[key]) {\n return false;\n }\n }\n\n return true;\n};\n\n/**\n * Checks whether an object has at least one enumerable key.\n *\n * @example\n * ```ts\n * hasEnumerableKeys({ id: 1 }); // true\n * hasEnumerableKeys({}); // false\n * ```\n */\nexport const hasEnumerableKeys = (input: AnyObject): boolean => {\n for (const _key in input) {\n return true;\n }\n return false;\n};\n\n/**\n * Wraps a value in an array when it is not already an array.\n *\n * @example\n * ```ts\n * toArray('item'); // ['item']\n * ```\n */\nexport const toArray = <TValue>(value: TValue | TValue[]): TValue[] => {\n return Array.isArray(value) ? value : [value];\n};\n\ntype DeepArray<TValue> = TValue | Array<DeepArray<TValue>>;\n\n/**\n * Recursively flattens a nested array and maps the collected values.\n *\n * @example\n * ```ts\n * flatMapDeep([1, [2, [3]]], (value) => value * 2); // [2, 4, 6]\n * ```\n */\nexport const flatMapDeep = <TSource, TNewValue>(\n arr: DeepArray<TSource>,\n fn: (value: TSource, i: number, arr: TSource[]) => TNewValue,\n): TNewValue[] => {\n const source: TSource[] = [];\n\n const collect = (value: DeepArray<TSource>): void => {\n if (!Array.isArray(value)) {\n source.push(value);\n return;\n }\n\n for (const item of value) {\n collect(item);\n }\n };\n\n collect(arr);\n\n return source.map((value, i) => fn(value, i, source));\n};\n\n/**\n * Parses JSON safely and returns a fallback value when parsing fails.\n *\n * @example\n * ```ts\n * safeJsonParse('{\"enabled\":true}', {}); // { enabled: true }\n * ```\n */\nexport const safeJsonParse = <TValue = any, TFallback = null>(\n json: Maybe<string>,\n fallback: TFallback = null as TFallback,\n): TValue | TFallback => {\n if (json == null) return fallback;\n\n try {\n return JSON.parse(json);\n } catch {\n return fallback;\n }\n};\n\nconst UNSAFE_PROPERTY_KEYS = new Set(['__proto__', 'prototype', 'constructor']);\n\n/**\n * Checks whether a property key is unsafe and can lead to prototype pollution.\n *\n * @example\n * isUnsafeProperty('__proto__'); // true\n * isUnsafeProperty('name'); // false\n */\nexport const isUnsafeProperty = (key: any) => UNSAFE_PROPERTY_KEYS.has(key);\n"],"mappings":";;;;;;;;;;AA4BA,IAAa,kBAAkB,GAAY,MAAwB;AACjE,KAAI,MAAM,EAAG,QAAO;AAEpB,KACE,OAAO,MAAM,YACb,OAAO,MAAM,YACb,MAAM,QACN,MAAM,KAEN,QAAO;AAGT,KAAI,EAAE,gBAAgB,EAAE,YAAa,QAAO;CAE5C,MAAM,WAAW,MAAM,QAAQ,EAAE;AAEjC,KAAI,aAAa,MAAM,QAAQ,EAAE,CAAE,QAAO;AAE1C,KAAI,UAAU;EACZ,MAAM,OAAO;EACb,MAAM,OAA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oB,QAAa,qBAAqB,IAAI,IAAI"}
1
+ {"version":3,"file":"data.cjs","names":[],"sources":["../src/data/flat-map-deep.ts","../src/data/has-enumerable-keys.ts","../src/data/is-shallow-equal.ts","../src/data/is-unsafe-property.ts","../src/data/safe-json-parse.ts","../src/data/to-array.ts"],"sourcesContent":["type DeepArray<TValue> = TValue | Array<DeepArray<TValue>>;\n\n/**\n * Recursively flattens a nested array and maps the collected values.\n *\n * @example\n * ```ts\n * flatMapDeep([1, [2, [3]]], (value) => value * 2); // [2, 4, 6]\n * ```\n */\nexport const flatMapDeep = <TSource, TNewValue>(\n arr: DeepArray<TSource>,\n fn: (value: TSource, i: number, arr: TSource[]) => TNewValue,\n): TNewValue[] => {\n const source: TSource[] = [];\n\n const collect = (value: DeepArray<TSource>): void => {\n if (!Array.isArray(value)) {\n source.push(value);\n return;\n }\n\n for (const item of value) {\n collect(item);\n }\n };\n\n collect(arr);\n\n return source.map((value, i) => fn(value, i, source));\n};\n","import type { AnyObject } from 'yummies/types';\n\n/**\n * Checks whether an object has at least one enumerable key.\n *\n * @example\n * ```ts\n * hasEnumerableKeys({ id: 1 }); // true\n * hasEnumerableKeys({}); // false\n * ```\n */\nexport const hasEnumerableKeys = (input: AnyObject): boolean => {\n for (const _key in input) {\n return true;\n }\n return false;\n};\n","import type { AnyObject } from 'yummies/types';\n\n/**\n * Performs a shallow comparison for arrays, plain objects, dates and regular expressions.\n *\n * @example\n * ```ts\n * isShallowEqual({ id: 1 }, { id: 1 }); // true\n * ```\n */\nexport const isShallowEqual = (a: unknown, b: unknown): boolean => {\n if (a === b) return true;\n\n if (\n typeof a !== 'object' ||\n typeof b !== 'object' ||\n a === null ||\n b === null\n ) {\n return false;\n }\n\n if (a.constructor !== b.constructor) return false;\n\n const isArrayA = Array.isArray(a);\n\n if (isArrayA !== Array.isArray(b)) return false;\n\n if (isArrayA) {\n const arrA = a as unknown[];\n const arrB = b as unknown[];\n if (arrA.length !== arrB.length) return false;\n\n for (const [i, element] of arrA.entries()) {\n if (element !== arrB[i]) return false;\n }\n return true;\n }\n\n if (a instanceof Date) return a.getTime() === (b as Date).getTime();\n\n if (a instanceof RegExp) return a.toString() === (b as RegExp).toString();\n\n const aKeys = Object.keys(a);\n const bKeys = Object.keys(b);\n\n if (aKeys.length !== bKeys.length) return false;\n\n const bObj = b as AnyObject;\n for (const key of aKeys) {\n if (!Object.hasOwn(bObj, key) || (a as AnyObject)[key] !== bObj[key]) {\n return false;\n }\n }\n\n return true;\n};\n","const UNSAFE_PROPERTY_KEYS = new Set(['__proto__', 'prototype', 'constructor']);\n\n/**\n * Checks whether a property key is unsafe and can lead to prototype pollution.\n *\n * @example\n * isUnsafeProperty('__proto__'); // true\n * isUnsafeProperty('name'); // false\n */\nexport const isUnsafeProperty = (key: any) => UNSAFE_PROPERTY_KEYS.has(key);\n","import type { Maybe } from 'yummies/types';\n\n/**\n * Parses JSON safely and returns a fallback value when parsing fails.\n *\n * @example\n * ```ts\n * safeJsonParse('{\"enabled\":true}', {}); // { enabled: true }\n * ```\n */\nexport const safeJsonParse = <TValue = any, TFallback = null>(\n json: Maybe<string>,\n fallback: TFallback = null as TFallback,\n): TValue | TFallback => {\n if (json == null) return fallback;\n\n try {\n return JSON.parse(json);\n } catch {\n return fallback;\n }\n};\n","/**\n * Wraps a value in an array when it is not already an array.\n *\n * @example\n * ```ts\n * toArray('item'); // ['item']\n * ```\n */\nexport const toArray = <TValue>(value: TValue | TValue[]): TValue[] => {\n return Array.isArray(value) ? value : [value];\n};\n"],"mappings":";;;;;;;;;;AAUA,IAAa,eACX,KACA,OACgB;CAChB,MAAM,SAAoB,CAAC;CAE3B,MAAM,WAAW,UAAoC;EACnD,IAAI,CAAC,MAAM,QAAQ,KAAK,GAAG;GACzB,OAAO,KAAK,KAAK;GACjB;EACF;EAEA,KAAK,MAAM,QAAQ,OACjB,QAAQ,IAAI;CAEhB;CAEA,QAAQ,GAAG;CAEX,OAAO,OAAO,KAAK,OAAO,MAAM,GAAG,OAAO,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ACxB,QAAQ;EACN,OAAO;CACT;AACF;;;;;;;;;;;ACbA,IAAa,WAAmB,UAAuC;CACrE,OAAO,MAAM,QAAQ,KAAK,IAAI,QAAQ,CAAC,KAAK;AAC9C"}
package/data.d.ts CHANGED
@@ -1,32 +1,16 @@
1
1
  import { AnyObject, Maybe } from 'yummies/types';
2
2
 
3
+ type DeepArray<TValue> = TValue | Array<DeepArray<TValue>>;
3
4
  /**
4
- * ---header-docs-section---
5
- * # yummies/data
6
- *
7
- * ## Description
8
- *
9
- * General-purpose data helpers: shallow equality, normalizing values to arrays, and recursive
10
- * `flatMap`-style transforms. They complement `Array`/`Object` builtins when you need stable
11
- * comparisons for memoization or small structural utilities without pulling a large lodash-style
12
- * dependency into the bundle.
13
- *
14
- * ## Usage
15
- *
16
- * ```ts
17
- * import { isShallowEqual, toArray } from "yummies/data";
18
- * ```
19
- */
20
-
21
- /**
22
- * Performs a shallow comparison for arrays, plain objects, dates and regular expressions.
5
+ * Recursively flattens a nested array and maps the collected values.
23
6
  *
24
7
  * @example
25
8
  * ```ts
26
- * isShallowEqual({ id: 1 }, { id: 1 }); // true
9
+ * flatMapDeep([1, [2, [3]]], (value) => value * 2); // [2, 4, 6]
27
10
  * ```
28
11
  */
29
- declare const isShallowEqual: (a: unknown, b: unknown) => boolean;
12
+ declare const flatMapDeep: <TSource, TNewValue>(arr: DeepArray<TSource>, fn: (value: TSource, i: number, arr: TSource[]) => TNewValue) => TNewValue[];
13
+
30
14
  /**
31
15
  * Checks whether an object has at least one enumerable key.
32
16
  *
@@ -37,25 +21,26 @@ declare const isShallowEqual: (a: unknown, b: unknown) => boolean;
37
21
  * ```
38
22
  */
39
23
  declare const hasEnumerableKeys: (input: AnyObject) => boolean;
24
+
40
25
  /**
41
- * Wraps a value in an array when it is not already an array.
26
+ * Performs a shallow comparison for arrays, plain objects, dates and regular expressions.
42
27
  *
43
28
  * @example
44
29
  * ```ts
45
- * toArray('item'); // ['item']
30
+ * isShallowEqual({ id: 1 }, { id: 1 }); // true
46
31
  * ```
47
32
  */
48
- declare const toArray: <TValue>(value: TValue | TValue[]) => TValue[];
49
- type DeepArray<TValue> = TValue | Array<DeepArray<TValue>>;
33
+ declare const isShallowEqual: (a: unknown, b: unknown) => boolean;
34
+
50
35
  /**
51
- * Recursively flattens a nested array and maps the collected values.
36
+ * Checks whether a property key is unsafe and can lead to prototype pollution.
52
37
  *
53
38
  * @example
54
- * ```ts
55
- * flatMapDeep([1, [2, [3]]], (value) => value * 2); // [2, 4, 6]
56
- * ```
39
+ * isUnsafeProperty('__proto__'); // true
40
+ * isUnsafeProperty('name'); // false
57
41
  */
58
- declare const flatMapDeep: <TSource, TNewValue>(arr: DeepArray<TSource>, fn: (value: TSource, i: number, arr: TSource[]) => TNewValue) => TNewValue[];
42
+ declare const isUnsafeProperty: (key: any) => boolean;
43
+
59
44
  /**
60
45
  * Parses JSON safely and returns a fallback value when parsing fails.
61
46
  *
@@ -65,13 +50,15 @@ declare const flatMapDeep: <TSource, TNewValue>(arr: DeepArray<TSource>, fn: (va
65
50
  * ```
66
51
  */
67
52
  declare const safeJsonParse: <TValue = any, TFallback = null>(json: Maybe<string>, fallback?: TFallback) => TValue | TFallback;
53
+
68
54
  /**
69
- * Checks whether a property key is unsafe and can lead to prototype pollution.
55
+ * Wraps a value in an array when it is not already an array.
70
56
  *
71
57
  * @example
72
- * isUnsafeProperty('__proto__'); // true
73
- * isUnsafeProperty('name'); // false
58
+ * ```ts
59
+ * toArray('item'); // ['item']
60
+ * ```
74
61
  */
75
- declare const isUnsafeProperty: (key: any) => boolean;
62
+ declare const toArray: <TValue>(value: TValue | TValue[]) => TValue[];
76
63
 
77
64
  export { flatMapDeep, hasEnumerableKeys, isShallowEqual, isUnsafeProperty, safeJsonParse, toArray };
package/data.js CHANGED
@@ -1,4 +1,41 @@
1
- //#region src/data.ts
1
+ //#region src/data/flat-map-deep.ts
2
+ /**
3
+ * Recursively flattens a nested array and maps the collected values.
4
+ *
5
+ * @example
6
+ * ```ts
7
+ * flatMapDeep([1, [2, [3]]], (value) => value * 2); // [2, 4, 6]
8
+ * ```
9
+ */
10
+ var flatMapDeep = (arr, fn) => {
11
+ const source = [];
12
+ const collect = (value) => {
13
+ if (!Array.isArray(value)) {
14
+ source.push(value);
15
+ return;
16
+ }
17
+ for (const item of value) collect(item);
18
+ };
19
+ collect(arr);
20
+ return source.map((value, i) => fn(value, i, source));
21
+ };
22
+ //#endregion
23
+ //#region src/data/has-enumerable-keys.ts
24
+ /**
25
+ * Checks whether an object has at least one enumerable key.
26
+ *
27
+ * @example
28
+ * ```ts
29
+ * hasEnumerableKeys({ id: 1 }); // true
30
+ * hasEnumerableKeys({}); // false
31
+ * ```
32
+ */
33
+ var hasEnumerableKeys = (input) => {
34
+ for (const _key in input) return true;
35
+ return false;
36
+ };
37
+ //#endregion
38
+ //#region src/data/is-shallow-equal.ts
2
39
  /**
3
40
  * Performs a shallow comparison for arrays, plain objects, dates and regular expressions.
4
41
  *
@@ -29,50 +66,23 @@ var isShallowEqual = (a, b) => {
29
66
  for (const key of aKeys) if (!Object.hasOwn(bObj, key) || a[key] !== bObj[key]) return false;
30
67
  return true;
31
68
  };
69
+ //#endregion
70
+ //#region src/data/is-unsafe-property.ts
71
+ var UNSAFE_PROPERTY_KEYS = new Set([
72
+ "__proto__",
73
+ "prototype",
74
+ "constructor"
75
+ ]);
32
76
  /**
33
- * Checks whether an object has at least one enumerable key.
34
- *
35
- * @example
36
- * ```ts
37
- * hasEnumerableKeys({ id: 1 }); // true
38
- * hasEnumerableKeys({}); // false
39
- * ```
40
- */
41
- var hasEnumerableKeys = (input) => {
42
- for (const _key in input) return true;
43
- return false;
44
- };
45
- /**
46
- * Wraps a value in an array when it is not already an array.
47
- *
48
- * @example
49
- * ```ts
50
- * toArray('item'); // ['item']
51
- * ```
52
- */
53
- var toArray = (value) => {
54
- return Array.isArray(value) ? value : [value];
55
- };
56
- /**
57
- * Recursively flattens a nested array and maps the collected values.
77
+ * Checks whether a property key is unsafe and can lead to prototype pollution.
58
78
  *
59
79
  * @example
60
- * ```ts
61
- * flatMapDeep([1, [2, [3]]], (value) => value * 2); // [2, 4, 6]
62
- * ```
80
+ * isUnsafeProperty('__proto__'); // true
81
+ * isUnsafeProperty('name'); // false
63
82
  */
64
- var flatMapDeep = (arr, fn) => {
65
- const source = [];
66
- const collect = (value) => {
67
- if (!Array.isArray(value)) {
68
- source.push(value);
69
- return;
70
- }
71
- for (const item of value) collect(item);
72
- };
73
- collect(arr);
74
- return source.map((value, i) => fn(value, i, source));
75
- };
83
+ var isUnsafeProperty = (key) => UNSAFE_PROPERTY_KEYS.has(key);
84
+ //#endregion
85
+ //#region src/data/safe-json-parse.ts
76
86
  /**
77
87
  * Parses JSON safely and returns a fallback value when parsing fails.
78
88
  *
@@ -89,19 +99,19 @@ var safeJsonParse = (json, fallback = null) => {
89
99
  return fallback;
90
100
  }
91
101
  };
92
- var UNSAFE_PROPERTY_KEYS = new Set([
93
- "__proto__",
94
- "prototype",
95
- "constructor"
96
- ]);
102
+ //#endregion
103
+ //#region src/data/to-array.ts
97
104
  /**
98
- * Checks whether a property key is unsafe and can lead to prototype pollution.
105
+ * Wraps a value in an array when it is not already an array.
99
106
  *
100
107
  * @example
101
- * isUnsafeProperty('__proto__'); // true
102
- * isUnsafeProperty('name'); // false
108
+ * ```ts
109
+ * toArray('item'); // ['item']
110
+ * ```
103
111
  */
104
- var isUnsafeProperty = (key) => UNSAFE_PROPERTY_KEYS.has(key);
112
+ var toArray = (value) => {
113
+ return Array.isArray(value) ? value : [value];
114
+ };
105
115
  //#endregion
106
116
  export { flatMapDeep, hasEnumerableKeys, isShallowEqual, isUnsafeProperty, safeJsonParse, toArray };
107
117
 
package/data.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"data.js","names":[],"sources":["../src/data.ts"],"sourcesContent":["/**\n * ---header-docs-section---\n * # yummies/data\n *\n * ## Description\n *\n * General-purpose data helpers: shallow equality, normalizing values to arrays, and recursive\n * `flatMap`-style transforms. They complement `Array`/`Object` builtins when you need stable\n * comparisons for memoization or small structural utilities without pulling a large lodash-style\n * dependency into the bundle.\n *\n * ## Usage\n *\n * ```ts\n * import { isShallowEqual, toArray } from \"yummies/data\";\n * ```\n */\n\nimport type { AnyObject, Maybe } from 'yummies/types';\n\n/**\n * Performs a shallow comparison for arrays, plain objects, dates and regular expressions.\n *\n * @example\n * ```ts\n * isShallowEqual({ id: 1 }, { id: 1 }); // true\n * ```\n */\nexport const isShallowEqual = (a: unknown, b: unknown): boolean => {\n if (a === b) return true;\n\n if (\n typeof a !== 'object' ||\n typeof b !== 'object' ||\n a === null ||\n b === null\n ) {\n return false;\n }\n\n if (a.constructor !== b.constructor) return false;\n\n const isArrayA = Array.isArray(a);\n\n if (isArrayA !== Array.isArray(b)) return false;\n\n if (isArrayA) {\n const arrA = a as unknown[];\n const arrB = b as unknown[];\n if (arrA.length !== arrB.length) return false;\n\n for (const [i, element] of arrA.entries()) {\n if (element !== arrB[i]) return false;\n }\n return true;\n }\n\n if (a instanceof Date) return a.getTime() === (b as Date).getTime();\n\n if (a instanceof RegExp) return a.toString() === (b as RegExp).toString();\n\n const aKeys = Object.keys(a);\n const bKeys = Object.keys(b);\n\n if (aKeys.length !== bKeys.length) return false;\n\n const bObj = b as AnyObject;\n for (const key of aKeys) {\n if (!Object.hasOwn(bObj, key) || (a as AnyObject)[key] !== bObj[key]) {\n return false;\n }\n }\n\n return true;\n};\n\n/**\n * Checks whether an object has at least one enumerable key.\n *\n * @example\n * ```ts\n * hasEnumerableKeys({ id: 1 }); // true\n * hasEnumerableKeys({}); // false\n * ```\n */\nexport const hasEnumerableKeys = (input: AnyObject): boolean => {\n for (const _key in input) {\n return true;\n }\n return false;\n};\n\n/**\n * Wraps a value in an array when it is not already an array.\n *\n * @example\n * ```ts\n * toArray('item'); // ['item']\n * ```\n */\nexport const toArray = <TValue>(value: TValue | TValue[]): TValue[] => {\n return Array.isArray(value) ? value : [value];\n};\n\ntype DeepArray<TValue> = TValue | Array<DeepArray<TValue>>;\n\n/**\n * Recursively flattens a nested array and maps the collected values.\n *\n * @example\n * ```ts\n * flatMapDeep([1, [2, [3]]], (value) => value * 2); // [2, 4, 6]\n * ```\n */\nexport const flatMapDeep = <TSource, TNewValue>(\n arr: DeepArray<TSource>,\n fn: (value: TSource, i: number, arr: TSource[]) => TNewValue,\n): TNewValue[] => {\n const source: TSource[] = [];\n\n const collect = (value: DeepArray<TSource>): void => {\n if (!Array.isArray(value)) {\n source.push(value);\n return;\n }\n\n for (const item of value) {\n collect(item);\n }\n };\n\n collect(arr);\n\n return source.map((value, i) => fn(value, i, source));\n};\n\n/**\n * Parses JSON safely and returns a fallback value when parsing fails.\n *\n * @example\n * ```ts\n * safeJsonParse('{\"enabled\":true}', {}); // { enabled: true }\n * ```\n */\nexport const safeJsonParse = <TValue = any, TFallback = null>(\n json: Maybe<string>,\n fallback: TFallback = null as TFallback,\n): TValue | TFallback => {\n if (json == null) return fallback;\n\n try {\n return JSON.parse(json);\n } catch {\n return fallback;\n }\n};\n\nconst UNSAFE_PROPERTY_KEYS = new Set(['__proto__', 'prototype', 'constructor']);\n\n/**\n * Checks whether a property key is unsafe and can lead to prototype pollution.\n *\n * @example\n * isUnsafeProperty('__proto__'); // true\n * isUnsafeProperty('name'); // false\n */\nexport const isUnsafeProperty = (key: any) => UNSAFE_PROPERTY_KEYS.has(key);\n"],"mappings":";;;;;;;;;AA4BA,IAAa,kBAAkB,GAAY,MAAwB;AACjE,KAAI,MAAM,EAAG,QAAO;AAEpB,KACE,OAAO,MAAM,YACb,OAAO,MAAM,YACb,MAAM,QACN,MAAM,KAEN,QAAO;AAGT,KAAI,EAAE,gBAAgB,EAAE,YAAa,QAAO;CAE5C,MAAM,WAAW,MAAM,QAAQ,EAAE;AAEjC,KAAI,aAAa,MAAM,QAAQ,EAAE,CAAE,QAAO;AAE1C,KAAI,UAAU;EACZ,MAAM,OAAO;EACb,MAAM,OAAO;AACb,MAAI,KAAK,WAAW,KAAK,O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1
+ {"version":3,"file":"data.js","names":[],"sources":["../src/data/flat-map-deep.ts","../src/data/has-enumerable-keys.ts","../src/data/is-shallow-equal.ts","../src/data/is-unsafe-property.ts","../src/data/safe-json-parse.ts","../src/data/to-array.ts"],"sourcesContent":["type DeepArray<TValue> = TValue | Array<DeepArray<TValue>>;\n\n/**\n * Recursively flattens a nested array and maps the collected values.\n *\n * @example\n * ```ts\n * flatMapDeep([1, [2, [3]]], (value) => value * 2); // [2, 4, 6]\n * ```\n */\nexport const flatMapDeep = <TSource, TNewValue>(\n arr: DeepArray<TSource>,\n fn: (value: TSource, i: number, arr: TSource[]) => TNewValue,\n): TNewValue[] => {\n const source: TSource[] = [];\n\n const collect = (value: DeepArray<TSource>): void => {\n if (!Array.isArray(value)) {\n source.push(value);\n return;\n }\n\n for (const item of value) {\n collect(item);\n }\n };\n\n collect(arr);\n\n return source.map((value, i) => fn(value, i, source));\n};\n","import type { AnyObject } from 'yummies/types';\n\n/**\n * Checks whether an object has at least one enumerable key.\n *\n * @example\n * ```ts\n * hasEnumerableKeys({ id: 1 }); // true\n * hasEnumerableKeys({}); // false\n * ```\n */\nexport const hasEnumerableKeys = (input: AnyObject): boolean => {\n for (const _key in input) {\n return true;\n }\n return false;\n};\n","import type { AnyObject } from 'yummies/types';\n\n/**\n * Performs a shallow comparison for arrays, plain objects, dates and regular expressions.\n *\n * @example\n * ```ts\n * isShallowEqual({ id: 1 }, { id: 1 }); // true\n * ```\n */\nexport const isShallowEqual = (a: unknown, b: unknown): boolean => {\n if (a === b) return true;\n\n if (\n typeof a !== 'object' ||\n typeof b !== 'object' ||\n a === null ||\n b === null\n ) {\n return false;\n }\n\n if (a.constructor !== b.constructor) return false;\n\n const isArrayA = Array.isArray(a);\n\n if (isArrayA !== Array.isArray(b)) return false;\n\n if (isArrayA) {\n const arrA = a as unknown[];\n const arrB = b as unknown[];\n if (arrA.length !== arrB.length) return false;\n\n for (const [i, element] of arrA.entries()) {\n if (element !== arrB[i]) return false;\n }\n return true;\n }\n\n if (a instanceof Date) return a.getTime() === (b as Date).getTime();\n\n if (a instanceof RegExp) return a.toString() === (b as RegExp).toString();\n\n const aKeys = Object.keys(a);\n const bKeys = Object.keys(b);\n\n if (aKeys.length !== bKeys.length) return false;\n\n const bObj = b as AnyObject;\n for (const key of aKeys) {\n if (!Object.hasOwn(bObj, key) || (a as AnyObject)[key] !== bObj[key]) {\n return false;\n }\n }\n\n return true;\n};\n","const UNSAFE_PROPERTY_KEYS = new Set(['__proto__', 'prototype', 'constructor']);\n\n/**\n * Checks whether a property key is unsafe and can lead to prototype pollution.\n *\n * @example\n * isUnsafeProperty('__proto__'); // true\n * isUnsafeProperty('name'); // false\n */\nexport const isUnsafeProperty = (key: any) => UNSAFE_PROPERTY_KEYS.has(key);\n","import type { Maybe } from 'yummies/types';\n\n/**\n * Parses JSON safely and returns a fallback value when parsing fails.\n *\n * @example\n * ```ts\n * safeJsonParse('{\"enabled\":true}', {}); // { enabled: true }\n * ```\n */\nexport const safeJsonParse = <TValue = any, TFallback = null>(\n json: Maybe<string>,\n fallback: TFallback = null as TFallback,\n): TValue | TFallback => {\n if (json == null) return fallback;\n\n try {\n return JSON.parse(json);\n } catch {\n return fallback;\n }\n};\n","/**\n * Wraps a value in an array when it is not already an array.\n *\n * @example\n * ```ts\n * toArray('item'); // ['item']\n * ```\n */\nexport const toArray = <TValue>(value: TValue | TValue[]): TValue[] => {\n return Array.isArray(value) ? value : [value];\n};\n"],"mappings":";;;;;;;;;AAUA,IAAa,eACX,KACA,OACgB;CAChB,MAAM,SAAoB,CAAC;CAE3B,MAAM,WAAW,UAAoC;EACnD,IAAI,CAAC,MAAM,QAAQ,KAAK,GAAG;GACzB,OAAO,KAAK,KAAK;GACjB;EACF;EAEA,KAAK,MAAM,QAAQ,OACjB,QAAQ,IAAI;CAEhB;CAEA,QAAQ,GAAG;CAEX,OAAO,OAAO,KAAK,OAAO,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AACtD;;;;;;;;;;;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