@hyperfrontend/immutable-api-utils 0.0.2 → 0.1.1

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 (188) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +66 -4
  3. package/built-in-copy/array/index.cjs.js +40 -0
  4. package/built-in-copy/array/index.cjs.js.map +1 -0
  5. package/built-in-copy/array/index.d.ts +40 -0
  6. package/built-in-copy/array/index.d.ts.map +1 -0
  7. package/built-in-copy/array/index.esm.js +35 -0
  8. package/built-in-copy/array/index.esm.js.map +1 -0
  9. package/built-in-copy/console/index.cjs.js +130 -0
  10. package/built-in-copy/console/index.cjs.js.map +1 -0
  11. package/built-in-copy/console/index.d.ts +105 -0
  12. package/built-in-copy/console/index.d.ts.map +1 -0
  13. package/built-in-copy/console/index.esm.js +110 -0
  14. package/built-in-copy/console/index.esm.js.map +1 -0
  15. package/built-in-copy/date/index.cjs.js +49 -0
  16. package/built-in-copy/date/index.cjs.js.map +1 -0
  17. package/built-in-copy/date/index.d.ts +49 -0
  18. package/built-in-copy/date/index.d.ts.map +1 -0
  19. package/built-in-copy/date/index.esm.js +43 -0
  20. package/built-in-copy/date/index.esm.js.map +1 -0
  21. package/built-in-copy/encoding/index.cjs.js +67 -0
  22. package/built-in-copy/encoding/index.cjs.js.map +1 -0
  23. package/built-in-copy/encoding/index.d.ts +52 -0
  24. package/built-in-copy/encoding/index.d.ts.map +1 -0
  25. package/built-in-copy/encoding/index.esm.js +61 -0
  26. package/built-in-copy/encoding/index.esm.js.map +1 -0
  27. package/built-in-copy/error/index.cjs.js +122 -0
  28. package/built-in-copy/error/index.cjs.js.map +1 -0
  29. package/built-in-copy/error/index.d.ts +99 -0
  30. package/built-in-copy/error/index.d.ts.map +1 -0
  31. package/built-in-copy/error/index.esm.js +112 -0
  32. package/built-in-copy/error/index.esm.js.map +1 -0
  33. package/built-in-copy/function/index.cjs.js +61 -0
  34. package/built-in-copy/function/index.cjs.js.map +1 -0
  35. package/built-in-copy/function/index.d.ts +47 -0
  36. package/built-in-copy/function/index.d.ts.map +1 -0
  37. package/built-in-copy/function/index.esm.js +54 -0
  38. package/built-in-copy/function/index.esm.js.map +1 -0
  39. package/built-in-copy/json/index.cjs.js +34 -0
  40. package/built-in-copy/json/index.cjs.js.map +1 -0
  41. package/built-in-copy/json/index.d.ts +31 -0
  42. package/built-in-copy/json/index.d.ts.map +1 -0
  43. package/built-in-copy/json/index.esm.js +30 -0
  44. package/built-in-copy/json/index.esm.js.map +1 -0
  45. package/built-in-copy/map/index.cjs.js +44 -0
  46. package/built-in-copy/map/index.cjs.js.map +1 -0
  47. package/built-in-copy/map/index.d.ts +33 -0
  48. package/built-in-copy/map/index.d.ts.map +1 -0
  49. package/built-in-copy/map/index.esm.js +40 -0
  50. package/built-in-copy/map/index.esm.js.map +1 -0
  51. package/built-in-copy/math/index.cjs.js +317 -0
  52. package/built-in-copy/math/index.cjs.js.map +1 -0
  53. package/built-in-copy/math/index.d.ts +232 -0
  54. package/built-in-copy/math/index.d.ts.map +1 -0
  55. package/built-in-copy/math/index.esm.js +272 -0
  56. package/built-in-copy/math/index.esm.js.map +1 -0
  57. package/built-in-copy/messaging/index.cjs.js +123 -0
  58. package/built-in-copy/messaging/index.cjs.js.map +1 -0
  59. package/built-in-copy/messaging/index.d.ts +95 -0
  60. package/built-in-copy/messaging/index.d.ts.map +1 -0
  61. package/built-in-copy/messaging/index.esm.js +114 -0
  62. package/built-in-copy/messaging/index.esm.js.map +1 -0
  63. package/built-in-copy/number/index.cjs.js +141 -0
  64. package/built-in-copy/number/index.cjs.js.map +1 -0
  65. package/built-in-copy/number/index.d.ts +95 -0
  66. package/built-in-copy/number/index.d.ts.map +1 -0
  67. package/built-in-copy/number/index.esm.js +123 -0
  68. package/built-in-copy/number/index.esm.js.map +1 -0
  69. package/built-in-copy/object/index.cjs.js +174 -0
  70. package/built-in-copy/object/index.cjs.js.map +1 -0
  71. package/built-in-copy/object/index.d.ts +209 -0
  72. package/built-in-copy/object/index.d.ts.map +1 -0
  73. package/built-in-copy/object/index.esm.js +149 -0
  74. package/built-in-copy/object/index.esm.js.map +1 -0
  75. package/built-in-copy/promise/index.cjs.js +80 -0
  76. package/built-in-copy/promise/index.cjs.js.map +1 -0
  77. package/built-in-copy/promise/index.d.ts +63 -0
  78. package/built-in-copy/promise/index.d.ts.map +1 -0
  79. package/built-in-copy/promise/index.esm.js +70 -0
  80. package/built-in-copy/promise/index.esm.js.map +1 -0
  81. package/built-in-copy/reflect/index.cjs.js +101 -0
  82. package/built-in-copy/reflect/index.cjs.js.map +1 -0
  83. package/built-in-copy/reflect/index.d.ts +81 -0
  84. package/built-in-copy/reflect/index.d.ts.map +1 -0
  85. package/built-in-copy/reflect/index.esm.js +86 -0
  86. package/built-in-copy/reflect/index.esm.js.map +1 -0
  87. package/built-in-copy/regexp/index.cjs.js +37 -0
  88. package/built-in-copy/regexp/index.cjs.js.map +1 -0
  89. package/built-in-copy/regexp/index.d.ts +28 -0
  90. package/built-in-copy/regexp/index.d.ts.map +1 -0
  91. package/built-in-copy/regexp/index.esm.js +34 -0
  92. package/built-in-copy/regexp/index.esm.js.map +1 -0
  93. package/built-in-copy/set/index.cjs.js +36 -0
  94. package/built-in-copy/set/index.cjs.js.map +1 -0
  95. package/built-in-copy/set/index.d.ts +27 -0
  96. package/built-in-copy/set/index.d.ts.map +1 -0
  97. package/built-in-copy/set/index.esm.js +33 -0
  98. package/built-in-copy/set/index.esm.js.map +1 -0
  99. package/built-in-copy/string/index.cjs.js +46 -0
  100. package/built-in-copy/string/index.cjs.js.map +1 -0
  101. package/built-in-copy/string/index.d.ts +34 -0
  102. package/built-in-copy/string/index.d.ts.map +1 -0
  103. package/built-in-copy/string/index.esm.js +41 -0
  104. package/built-in-copy/string/index.esm.js.map +1 -0
  105. package/built-in-copy/symbol/index.cjs.js +123 -0
  106. package/built-in-copy/symbol/index.cjs.js.map +1 -0
  107. package/built-in-copy/symbol/index.d.ts +99 -0
  108. package/built-in-copy/symbol/index.d.ts.map +1 -0
  109. package/built-in-copy/symbol/index.esm.js +105 -0
  110. package/built-in-copy/symbol/index.esm.js.map +1 -0
  111. package/built-in-copy/timers/index.cjs.js +105 -0
  112. package/built-in-copy/timers/index.cjs.js.map +1 -0
  113. package/built-in-copy/timers/index.d.ts +73 -0
  114. package/built-in-copy/timers/index.d.ts.map +1 -0
  115. package/built-in-copy/timers/index.esm.js +96 -0
  116. package/built-in-copy/timers/index.esm.js.map +1 -0
  117. package/built-in-copy/typed-arrays/index.cjs.js +360 -0
  118. package/built-in-copy/typed-arrays/index.cjs.js.map +1 -0
  119. package/built-in-copy/typed-arrays/index.d.ts +321 -0
  120. package/built-in-copy/typed-arrays/index.d.ts.map +1 -0
  121. package/built-in-copy/typed-arrays/index.esm.js +321 -0
  122. package/built-in-copy/typed-arrays/index.esm.js.map +1 -0
  123. package/built-in-copy/url/index.cjs.js +103 -0
  124. package/built-in-copy/url/index.cjs.js.map +1 -0
  125. package/built-in-copy/url/index.d.ts +71 -0
  126. package/built-in-copy/url/index.d.ts.map +1 -0
  127. package/built-in-copy/url/index.esm.js +95 -0
  128. package/built-in-copy/url/index.esm.js.map +1 -0
  129. package/built-in-copy/weak-map/index.cjs.js +36 -0
  130. package/built-in-copy/weak-map/index.cjs.js.map +1 -0
  131. package/built-in-copy/weak-map/index.d.ts +27 -0
  132. package/built-in-copy/weak-map/index.d.ts.map +1 -0
  133. package/built-in-copy/weak-map/index.esm.js +33 -0
  134. package/built-in-copy/weak-map/index.esm.js.map +1 -0
  135. package/built-in-copy/weak-set/index.cjs.js +36 -0
  136. package/built-in-copy/weak-set/index.cjs.js.map +1 -0
  137. package/built-in-copy/weak-set/index.d.ts +27 -0
  138. package/built-in-copy/weak-set/index.d.ts.map +1 -0
  139. package/built-in-copy/weak-set/index.esm.js +33 -0
  140. package/built-in-copy/weak-set/index.esm.js.map +1 -0
  141. package/built-in-copy/websocket/index.cjs.js +50 -0
  142. package/built-in-copy/websocket/index.cjs.js.map +1 -0
  143. package/built-in-copy/websocket/index.d.ts +37 -0
  144. package/built-in-copy/websocket/index.d.ts.map +1 -0
  145. package/built-in-copy/websocket/index.esm.js +43 -0
  146. package/built-in-copy/websocket/index.esm.js.map +1 -0
  147. package/bundle/index.iife.js +1167 -5
  148. package/bundle/index.iife.js.map +1 -1
  149. package/bundle/index.iife.min.js +1 -1
  150. package/bundle/index.iife.min.js.map +1 -1
  151. package/bundle/index.umd.js +1167 -5
  152. package/bundle/index.umd.js.map +1 -1
  153. package/bundle/index.umd.min.js +1 -1
  154. package/bundle/index.umd.min.js.map +1 -1
  155. package/index.cjs.js +1167 -5
  156. package/index.cjs.js.map +1 -1
  157. package/index.d.ts +32 -3
  158. package/index.d.ts.map +1 -1
  159. package/index.esm.js +1151 -6
  160. package/index.esm.js.map +1 -1
  161. package/lib/locked-prop-descriptors.d.ts.map +1 -0
  162. package/lib/locked-props.d.ts.map +1 -0
  163. package/{locked.d.ts → lib/locked.d.ts} +12 -1
  164. package/lib/locked.d.ts.map +1 -0
  165. package/locked/index.cjs.js +107 -0
  166. package/locked/index.cjs.js.map +1 -0
  167. package/locked/index.d.ts +2 -0
  168. package/locked/index.d.ts.map +1 -0
  169. package/locked/index.esm.js +105 -0
  170. package/locked/index.esm.js.map +1 -0
  171. package/locked-prop-descriptors/index.cjs.js +11 -0
  172. package/locked-prop-descriptors/index.cjs.js.map +1 -0
  173. package/locked-prop-descriptors/index.d.ts +2 -0
  174. package/locked-prop-descriptors/index.d.ts.map +1 -0
  175. package/locked-prop-descriptors/index.esm.js +9 -0
  176. package/locked-prop-descriptors/index.esm.js.map +1 -0
  177. package/locked-props/index.cjs.js +32 -0
  178. package/locked-props/index.cjs.js.map +1 -0
  179. package/locked-props/index.d.ts +2 -0
  180. package/locked-props/index.d.ts.map +1 -0
  181. package/locked-props/index.esm.js +30 -0
  182. package/locked-props/index.esm.js.map +1 -0
  183. package/package.json +149 -14
  184. package/locked-prop-descriptors.d.ts.map +0 -1
  185. package/locked-props.d.ts.map +0 -1
  186. package/locked.d.ts.map +0 -1
  187. /package/{locked-prop-descriptors.d.ts → lib/locked-prop-descriptors.d.ts} +0 -0
  188. /package/{locked-props.d.ts → lib/locked-props.d.ts} +0 -0
@@ -0,0 +1,141 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * Safe copies of Number built-in methods and constants.
5
+ *
6
+ * These references are captured at module initialization time to protect against
7
+ * prototype pollution attacks. Import only what you need for tree-shaking.
8
+ *
9
+ * @module @hyperfrontend/immutable-api-utils/built-in-copy/number
10
+ */
11
+ // Capture references at module initialization time
12
+ const _Number = globalThis.Number;
13
+ const _parseInt = globalThis.parseInt;
14
+ const _parseFloat = globalThis.parseFloat;
15
+ const _isNaN = globalThis.isNaN;
16
+ const _isFinite = globalThis.isFinite;
17
+ const _freeze = globalThis.Object.freeze;
18
+ // ============================================================================
19
+ // Constants
20
+ // ============================================================================
21
+ /**
22
+ * (Safe copy) The largest positive representable number.
23
+ */
24
+ const MAX_VALUE = _Number.MAX_VALUE;
25
+ /**
26
+ * (Safe copy) The smallest positive representable number.
27
+ */
28
+ const MIN_VALUE = _Number.MIN_VALUE;
29
+ /**
30
+ * (Safe copy) The largest safe integer (2^53 - 1).
31
+ */
32
+ const MAX_SAFE_INTEGER = _Number.MAX_SAFE_INTEGER;
33
+ /**
34
+ * (Safe copy) The smallest safe integer (-(2^53 - 1)).
35
+ */
36
+ const MIN_SAFE_INTEGER = _Number.MIN_SAFE_INTEGER;
37
+ /**
38
+ * (Safe copy) Positive infinity.
39
+ */
40
+ const POSITIVE_INFINITY = _Number.POSITIVE_INFINITY;
41
+ /**
42
+ * (Safe copy) Negative infinity.
43
+ */
44
+ const NEGATIVE_INFINITY = _Number.NEGATIVE_INFINITY;
45
+ /**
46
+ * (Safe copy) The difference between 1 and the smallest floating point number greater than 1.
47
+ */
48
+ const EPSILON = _Number.EPSILON;
49
+ /**
50
+ * (Safe copy) Not-a-Number value.
51
+ */
52
+ const NUMBER_NaN = _Number.NaN;
53
+ // ============================================================================
54
+ // Type Checking
55
+ // ============================================================================
56
+ /**
57
+ * (Safe copy) Determines whether the passed value is NaN (Number method, stricter than global isNaN).
58
+ */
59
+ const isNaN = _Number.isNaN;
60
+ /**
61
+ * (Safe copy) Determines whether the passed value is a finite number.
62
+ */
63
+ const isFinite = _Number.isFinite;
64
+ /**
65
+ * (Safe copy) Determines whether the passed value is an integer.
66
+ */
67
+ const isInteger = _Number.isInteger;
68
+ /**
69
+ * (Safe copy) Determines whether the passed value is a safe integer.
70
+ */
71
+ const isSafeInteger = _Number.isSafeInteger;
72
+ // ============================================================================
73
+ // Parsing
74
+ // ============================================================================
75
+ /**
76
+ * (Safe copy) Parses a string and returns an integer.
77
+ */
78
+ const parseInt = _parseInt;
79
+ /**
80
+ * (Safe copy) Parses a string and returns a floating point number.
81
+ */
82
+ const parseFloat = _parseFloat;
83
+ // ============================================================================
84
+ // Global Type Checking (legacy, less strict)
85
+ // ============================================================================
86
+ /**
87
+ * (Safe copy) Global isNaN function (coerces to number first, less strict than Number.isNaN).
88
+ */
89
+ const globalIsNaN = _isNaN;
90
+ /**
91
+ * (Safe copy) Global isFinite function (coerces to number first, less strict than Number.isFinite).
92
+ */
93
+ const globalIsFinite = _isFinite;
94
+ // ============================================================================
95
+ // Namespace Export
96
+ // ============================================================================
97
+ /**
98
+ * (Safe copy) Namespace object containing all Number utilities.
99
+ * Note: Importing this imports all methods in this namespace (no tree-shaking).
100
+ */
101
+ const Number = _freeze({
102
+ // Constants
103
+ MAX_VALUE,
104
+ MIN_VALUE,
105
+ MAX_SAFE_INTEGER,
106
+ MIN_SAFE_INTEGER,
107
+ POSITIVE_INFINITY,
108
+ NEGATIVE_INFINITY,
109
+ EPSILON,
110
+ NUMBER_NaN,
111
+ // Type checking
112
+ isNaN,
113
+ isFinite,
114
+ isInteger,
115
+ isSafeInteger,
116
+ // Parsing
117
+ parseInt,
118
+ parseFloat,
119
+ // Global (legacy)
120
+ globalIsNaN,
121
+ globalIsFinite,
122
+ });
123
+
124
+ exports.EPSILON = EPSILON;
125
+ exports.MAX_SAFE_INTEGER = MAX_SAFE_INTEGER;
126
+ exports.MAX_VALUE = MAX_VALUE;
127
+ exports.MIN_SAFE_INTEGER = MIN_SAFE_INTEGER;
128
+ exports.MIN_VALUE = MIN_VALUE;
129
+ exports.NEGATIVE_INFINITY = NEGATIVE_INFINITY;
130
+ exports.NUMBER_NaN = NUMBER_NaN;
131
+ exports.Number = Number;
132
+ exports.POSITIVE_INFINITY = POSITIVE_INFINITY;
133
+ exports.globalIsFinite = globalIsFinite;
134
+ exports.globalIsNaN = globalIsNaN;
135
+ exports.isFinite = isFinite;
136
+ exports.isInteger = isInteger;
137
+ exports.isNaN = isNaN;
138
+ exports.isSafeInteger = isSafeInteger;
139
+ exports.parseFloat = parseFloat;
140
+ exports.parseInt = parseInt;
141
+ //# sourceMappingURL=index.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../../../../../../../../../libs/utils/immutable-api/src/built-in-copy/number/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;;;;;AAOG;AAEH;AACA,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM;AACjC,MAAM,SAAS,GAAG,UAAU,CAAC,QAAQ;AACrC,MAAM,WAAW,GAAG,UAAU,CAAC,UAAU;AACzC,MAAM,MAAM,GAAG,UAAU,CAAC,KAAK;AAC/B,MAAM,SAAS,GAAG,UAAU,CAAC,QAAQ;AACrC,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,MAAM;AAExC;AACA;AACA;AAEA;;AAEG;AACI,MAAM,SAAS,GAAG,OAAO,CAAC;AAEjC;;AAEG;AACI,MAAM,SAAS,GAAG,OAAO,CAAC;AAEjC;;AAEG;AACI,MAAM,gBAAgB,GAAG,OAAO,CAAC;AAExC;;AAEG;AACI,MAAM,gBAAgB,GAAG,OAAO,CAAC;AAExC;;AAEG;AACI,MAAM,iBAAiB,GAAG,OAAO,CAAC;AAEzC;;AAEG;AACI,MAAM,iBAAiB,GAAG,OAAO,CAAC;AAEzC;;AAEG;AACI,MAAM,OAAO,GAAG,OAAO,CAAC;AAE/B;;AAEG;AACI,MAAM,UAAU,GAAG,OAAO,CAAC;AAElC;AACA;AACA;AAEA;;AAEG;AACI,MAAM,KAAK,GAAG,OAAO,CAAC;AAE7B;;AAEG;AACI,MAAM,QAAQ,GAAG,OAAO,CAAC;AAEhC;;AAEG;AACI,MAAM,SAAS,GAAG,OAAO,CAAC;AAEjC;;AAEG;AACI,MAAM,aAAa,GAAG,OAAO,CAAC;AAErC;AACA;AACA;AAEA;;AAEG;AACI,MAAM,QAAQ,GAAG;AAExB;;AAEG;AACI,MAAM,UAAU,GAAG;AAE1B;AACA;AACA;AAEA;;AAEG;AACI,MAAM,WAAW,GAAG;AAE3B;;AAEG;AACI,MAAM,cAAc,GAAG;AAE9B;AACA;AACA;AAEA;;;AAGG;AACI,MAAM,MAAM,GAAG,OAAO,CAAQ;;IAEnC,SAAS;IACT,SAAS;IACT,gBAAgB;IAChB,gBAAgB;IAChB,iBAAiB;IACjB,iBAAiB;IACjB,OAAO;IACP,UAAU;;IAEV,KAAK;IACL,QAAQ;IACR,SAAS;IACT,aAAa;;IAEb,QAAQ;IACR,UAAU;;IAEV,WAAW;IACX,cAAc;AACf,CAAA;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,95 @@
1
+ /**
2
+ * Safe copies of Number built-in methods and constants.
3
+ *
4
+ * These references are captured at module initialization time to protect against
5
+ * prototype pollution attacks. Import only what you need for tree-shaking.
6
+ *
7
+ * @module @hyperfrontend/immutable-api-utils/built-in-copy/number
8
+ */
9
+ /**
10
+ * (Safe copy) The largest positive representable number.
11
+ */
12
+ export declare const MAX_VALUE: number;
13
+ /**
14
+ * (Safe copy) The smallest positive representable number.
15
+ */
16
+ export declare const MIN_VALUE: number;
17
+ /**
18
+ * (Safe copy) The largest safe integer (2^53 - 1).
19
+ */
20
+ export declare const MAX_SAFE_INTEGER: number;
21
+ /**
22
+ * (Safe copy) The smallest safe integer (-(2^53 - 1)).
23
+ */
24
+ export declare const MIN_SAFE_INTEGER: number;
25
+ /**
26
+ * (Safe copy) Positive infinity.
27
+ */
28
+ export declare const POSITIVE_INFINITY: number;
29
+ /**
30
+ * (Safe copy) Negative infinity.
31
+ */
32
+ export declare const NEGATIVE_INFINITY: number;
33
+ /**
34
+ * (Safe copy) The difference between 1 and the smallest floating point number greater than 1.
35
+ */
36
+ export declare const EPSILON: number;
37
+ /**
38
+ * (Safe copy) Not-a-Number value.
39
+ */
40
+ export declare const NUMBER_NaN: number;
41
+ /**
42
+ * (Safe copy) Determines whether the passed value is NaN (Number method, stricter than global isNaN).
43
+ */
44
+ export declare const isNaN: (number: unknown) => boolean;
45
+ /**
46
+ * (Safe copy) Determines whether the passed value is a finite number.
47
+ */
48
+ export declare const isFinite: (number: unknown) => boolean;
49
+ /**
50
+ * (Safe copy) Determines whether the passed value is an integer.
51
+ */
52
+ export declare const isInteger: (number: unknown) => boolean;
53
+ /**
54
+ * (Safe copy) Determines whether the passed value is a safe integer.
55
+ */
56
+ export declare const isSafeInteger: (number: unknown) => boolean;
57
+ /**
58
+ * (Safe copy) Parses a string and returns an integer.
59
+ */
60
+ export declare const parseInt: typeof globalThis.parseInt;
61
+ /**
62
+ * (Safe copy) Parses a string and returns a floating point number.
63
+ */
64
+ export declare const parseFloat: typeof globalThis.parseFloat;
65
+ /**
66
+ * (Safe copy) Global isNaN function (coerces to number first, less strict than Number.isNaN).
67
+ */
68
+ export declare const globalIsNaN: typeof globalThis.isNaN;
69
+ /**
70
+ * (Safe copy) Global isFinite function (coerces to number first, less strict than Number.isFinite).
71
+ */
72
+ export declare const globalIsFinite: typeof globalThis.isFinite;
73
+ /**
74
+ * (Safe copy) Namespace object containing all Number utilities.
75
+ * Note: Importing this imports all methods in this namespace (no tree-shaking).
76
+ */
77
+ export declare const Number: Readonly<{
78
+ readonly MAX_VALUE: number;
79
+ readonly MIN_VALUE: number;
80
+ readonly MAX_SAFE_INTEGER: number;
81
+ readonly MIN_SAFE_INTEGER: number;
82
+ readonly POSITIVE_INFINITY: number;
83
+ readonly NEGATIVE_INFINITY: number;
84
+ readonly EPSILON: number;
85
+ readonly NUMBER_NaN: number;
86
+ readonly isNaN: (number: unknown) => boolean;
87
+ readonly isFinite: (number: unknown) => boolean;
88
+ readonly isInteger: (number: unknown) => boolean;
89
+ readonly isSafeInteger: (number: unknown) => boolean;
90
+ readonly parseInt: typeof globalThis.parseInt;
91
+ readonly parseFloat: typeof globalThis.parseFloat;
92
+ readonly globalIsNaN: typeof globalThis.isNaN;
93
+ readonly globalIsFinite: typeof globalThis.isFinite;
94
+ }>;
95
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../../libs/utils/immutable-api/src/built-in-copy/number/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAcH;;GAEG;AACH,eAAO,MAAM,SAAS,QAAoB,CAAA;AAE1C;;GAEG;AACH,eAAO,MAAM,SAAS,QAAoB,CAAA;AAE1C;;GAEG;AACH,eAAO,MAAM,gBAAgB,QAA2B,CAAA;AAExD;;GAEG;AACH,eAAO,MAAM,gBAAgB,QAA2B,CAAA;AAExD;;GAEG;AACH,eAAO,MAAM,iBAAiB,QAA4B,CAAA;AAE1D;;GAEG;AACH,eAAO,MAAM,iBAAiB,QAA4B,CAAA;AAE1D;;GAEG;AACH,eAAO,MAAM,OAAO,QAAkB,CAAA;AAEtC;;GAEG;AACH,eAAO,MAAM,UAAU,QAAc,CAAA;AAMrC;;GAEG;AACH,eAAO,MAAM,KAAK,8BAAgB,CAAA;AAElC;;GAEG;AACH,eAAO,MAAM,QAAQ,8BAAmB,CAAA;AAExC;;GAEG;AACH,eAAO,MAAM,SAAS,8BAAoB,CAAA;AAE1C;;GAEG;AACH,eAAO,MAAM,aAAa,8BAAwB,CAAA;AAMlD;;GAEG;AACH,eAAO,MAAM,QAAQ,4BAAY,CAAA;AAEjC;;GAEG;AACH,eAAO,MAAM,UAAU,8BAAc,CAAA;AAMrC;;GAEG;AACH,eAAO,MAAM,WAAW,yBAAS,CAAA;AAEjC;;GAEG;AACH,eAAO,MAAM,cAAc,4BAAY,CAAA;AAMvC;;;GAGG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;EAqBjB,CAAA"}
@@ -0,0 +1,123 @@
1
+ /**
2
+ * Safe copies of Number built-in methods and constants.
3
+ *
4
+ * These references are captured at module initialization time to protect against
5
+ * prototype pollution attacks. Import only what you need for tree-shaking.
6
+ *
7
+ * @module @hyperfrontend/immutable-api-utils/built-in-copy/number
8
+ */
9
+ // Capture references at module initialization time
10
+ const _Number = globalThis.Number;
11
+ const _parseInt = globalThis.parseInt;
12
+ const _parseFloat = globalThis.parseFloat;
13
+ const _isNaN = globalThis.isNaN;
14
+ const _isFinite = globalThis.isFinite;
15
+ const _freeze = globalThis.Object.freeze;
16
+ // ============================================================================
17
+ // Constants
18
+ // ============================================================================
19
+ /**
20
+ * (Safe copy) The largest positive representable number.
21
+ */
22
+ const MAX_VALUE = _Number.MAX_VALUE;
23
+ /**
24
+ * (Safe copy) The smallest positive representable number.
25
+ */
26
+ const MIN_VALUE = _Number.MIN_VALUE;
27
+ /**
28
+ * (Safe copy) The largest safe integer (2^53 - 1).
29
+ */
30
+ const MAX_SAFE_INTEGER = _Number.MAX_SAFE_INTEGER;
31
+ /**
32
+ * (Safe copy) The smallest safe integer (-(2^53 - 1)).
33
+ */
34
+ const MIN_SAFE_INTEGER = _Number.MIN_SAFE_INTEGER;
35
+ /**
36
+ * (Safe copy) Positive infinity.
37
+ */
38
+ const POSITIVE_INFINITY = _Number.POSITIVE_INFINITY;
39
+ /**
40
+ * (Safe copy) Negative infinity.
41
+ */
42
+ const NEGATIVE_INFINITY = _Number.NEGATIVE_INFINITY;
43
+ /**
44
+ * (Safe copy) The difference between 1 and the smallest floating point number greater than 1.
45
+ */
46
+ const EPSILON = _Number.EPSILON;
47
+ /**
48
+ * (Safe copy) Not-a-Number value.
49
+ */
50
+ const NUMBER_NaN = _Number.NaN;
51
+ // ============================================================================
52
+ // Type Checking
53
+ // ============================================================================
54
+ /**
55
+ * (Safe copy) Determines whether the passed value is NaN (Number method, stricter than global isNaN).
56
+ */
57
+ const isNaN = _Number.isNaN;
58
+ /**
59
+ * (Safe copy) Determines whether the passed value is a finite number.
60
+ */
61
+ const isFinite = _Number.isFinite;
62
+ /**
63
+ * (Safe copy) Determines whether the passed value is an integer.
64
+ */
65
+ const isInteger = _Number.isInteger;
66
+ /**
67
+ * (Safe copy) Determines whether the passed value is a safe integer.
68
+ */
69
+ const isSafeInteger = _Number.isSafeInteger;
70
+ // ============================================================================
71
+ // Parsing
72
+ // ============================================================================
73
+ /**
74
+ * (Safe copy) Parses a string and returns an integer.
75
+ */
76
+ const parseInt = _parseInt;
77
+ /**
78
+ * (Safe copy) Parses a string and returns a floating point number.
79
+ */
80
+ const parseFloat = _parseFloat;
81
+ // ============================================================================
82
+ // Global Type Checking (legacy, less strict)
83
+ // ============================================================================
84
+ /**
85
+ * (Safe copy) Global isNaN function (coerces to number first, less strict than Number.isNaN).
86
+ */
87
+ const globalIsNaN = _isNaN;
88
+ /**
89
+ * (Safe copy) Global isFinite function (coerces to number first, less strict than Number.isFinite).
90
+ */
91
+ const globalIsFinite = _isFinite;
92
+ // ============================================================================
93
+ // Namespace Export
94
+ // ============================================================================
95
+ /**
96
+ * (Safe copy) Namespace object containing all Number utilities.
97
+ * Note: Importing this imports all methods in this namespace (no tree-shaking).
98
+ */
99
+ const Number = _freeze({
100
+ // Constants
101
+ MAX_VALUE,
102
+ MIN_VALUE,
103
+ MAX_SAFE_INTEGER,
104
+ MIN_SAFE_INTEGER,
105
+ POSITIVE_INFINITY,
106
+ NEGATIVE_INFINITY,
107
+ EPSILON,
108
+ NUMBER_NaN,
109
+ // Type checking
110
+ isNaN,
111
+ isFinite,
112
+ isInteger,
113
+ isSafeInteger,
114
+ // Parsing
115
+ parseInt,
116
+ parseFloat,
117
+ // Global (legacy)
118
+ globalIsNaN,
119
+ globalIsFinite,
120
+ });
121
+
122
+ export { EPSILON, MAX_SAFE_INTEGER, MAX_VALUE, MIN_SAFE_INTEGER, MIN_VALUE, NEGATIVE_INFINITY, NUMBER_NaN, Number, POSITIVE_INFINITY, globalIsFinite, globalIsNaN, isFinite, isInteger, isNaN, isSafeInteger, parseFloat, parseInt };
123
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm.js","sources":["../../../../../../../../../../../libs/utils/immutable-api/src/built-in-copy/number/index.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;;;;;;;AAOG;AAEH;AACA,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM;AACjC,MAAM,SAAS,GAAG,UAAU,CAAC,QAAQ;AACrC,MAAM,WAAW,GAAG,UAAU,CAAC,UAAU;AACzC,MAAM,MAAM,GAAG,UAAU,CAAC,KAAK;AAC/B,MAAM,SAAS,GAAG,UAAU,CAAC,QAAQ;AACrC,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,MAAM;AAExC;AACA;AACA;AAEA;;AAEG;AACI,MAAM,SAAS,GAAG,OAAO,CAAC;AAEjC;;AAEG;AACI,MAAM,SAAS,GAAG,OAAO,CAAC;AAEjC;;AAEG;AACI,MAAM,gBAAgB,GAAG,OAAO,CAAC;AAExC;;AAEG;AACI,MAAM,gBAAgB,GAAG,OAAO,CAAC;AAExC;;AAEG;AACI,MAAM,iBAAiB,GAAG,OAAO,CAAC;AAEzC;;AAEG;AACI,MAAM,iBAAiB,GAAG,OAAO,CAAC;AAEzC;;AAEG;AACI,MAAM,OAAO,GAAG,OAAO,CAAC;AAE/B;;AAEG;AACI,MAAM,UAAU,GAAG,OAAO,CAAC;AAElC;AACA;AACA;AAEA;;AAEG;AACI,MAAM,KAAK,GAAG,OAAO,CAAC;AAE7B;;AAEG;AACI,MAAM,QAAQ,GAAG,OAAO,CAAC;AAEhC;;AAEG;AACI,MAAM,SAAS,GAAG,OAAO,CAAC;AAEjC;;AAEG;AACI,MAAM,aAAa,GAAG,OAAO,CAAC;AAErC;AACA;AACA;AAEA;;AAEG;AACI,MAAM,QAAQ,GAAG;AAExB;;AAEG;AACI,MAAM,UAAU,GAAG;AAE1B;AACA;AACA;AAEA;;AAEG;AACI,MAAM,WAAW,GAAG;AAE3B;;AAEG;AACI,MAAM,cAAc,GAAG;AAE9B;AACA;AACA;AAEA;;;AAGG;AACI,MAAM,MAAM,GAAG,OAAO,CAAQ;;IAEnC,SAAS;IACT,SAAS;IACT,gBAAgB;IAChB,gBAAgB;IAChB,iBAAiB;IACjB,iBAAiB;IACjB,OAAO;IACP,UAAU;;IAEV,KAAK;IACL,QAAQ;IACR,SAAS;IACT,aAAa;;IAEb,QAAQ;IACR,UAAU;;IAEV,WAAW;IACX,cAAc;AACf,CAAA;;;;"}
@@ -0,0 +1,174 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * Safe copies of Object built-in methods.
5
+ *
6
+ * These references are captured at module initialization time to protect against
7
+ * prototype pollution attacks. Import only what you need for tree-shaking.
8
+ *
9
+ * @module @hyperfrontend/immutable-api-utils/built-in-copy/object
10
+ */
11
+ // Capture references at module initialization time
12
+ const _Object = globalThis.Object;
13
+ const _Reflect = globalThis.Reflect;
14
+ const _ObjectPrototype = _Object.prototype;
15
+ const _hasOwnProperty = _ObjectPrototype.hasOwnProperty;
16
+ const _toString = _ObjectPrototype.toString;
17
+ /**
18
+ * (Safe copy) Prevents modification of existing property attributes and values,
19
+ * and prevents the addition of new properties.
20
+ */
21
+ const freeze = _Object.freeze;
22
+ /**
23
+ * (Safe copy) Creates an object that has the specified prototype or that has null prototype.
24
+ */
25
+ const create = _Object.create;
26
+ /**
27
+ * (Safe copy) Returns the names of the enumerable string properties and methods of an object.
28
+ */
29
+ const keys = _Object.keys;
30
+ /**
31
+ * (Safe copy) Returns an array of key/values of the enumerable own properties of an object.
32
+ */
33
+ const entries = _Object.entries;
34
+ /**
35
+ * (Safe copy) Returns an array of values of the enumerable own properties of an object.
36
+ */
37
+ const values = _Object.values;
38
+ /**
39
+ * (Safe copy) Returns an object from an iterable of key-value pairs.
40
+ */
41
+ const fromEntries = _Object.fromEntries;
42
+ /**
43
+ * (Safe copy) Copy the values of all enumerable own properties from one or more source objects
44
+ * to a target object. Returns the target object.
45
+ */
46
+ const assign = _Object.assign;
47
+ /**
48
+ * (Safe copy) Adds a property to an object, or modifies attributes of an existing property.
49
+ */
50
+ const defineProperty = _Object.defineProperty;
51
+ /**
52
+ * (Safe copy) Adds one or more properties to an object, and/or modifies attributes of existing properties.
53
+ */
54
+ const defineProperties = _Object.defineProperties;
55
+ /**
56
+ * (Safe copy) Determines whether an object has a property with the specified name.
57
+ */
58
+ const objectHasOwn = _Object.hasOwn;
59
+ /**
60
+ * (Safe copy) Sets the prototype of a specified object o to object proto or null.
61
+ */
62
+ const setPrototypeOf = _Object.setPrototypeOf;
63
+ /**
64
+ * (Safe copy) Returns the prototype of an object.
65
+ */
66
+ const getPrototypeOf = _Object.getPrototypeOf;
67
+ /**
68
+ * (Safe copy) Prevents the addition of new properties to an object.
69
+ */
70
+ const seal = _Object.seal;
71
+ /**
72
+ * (Safe copy) Returns true if existing property attributes and values cannot be modified
73
+ * in an object, and new properties cannot be added to the object.
74
+ */
75
+ const isFrozen = _Object.isFrozen;
76
+ /**
77
+ * (Safe copy) Returns true if existing property attributes cannot be modified in an object
78
+ * and new properties cannot be added to the object.
79
+ */
80
+ const isSealed = _Object.isSealed;
81
+ /**
82
+ * (Safe copy) Returns a value that indicates whether new properties can be added to an object.
83
+ */
84
+ const isExtensible = _Object.isExtensible;
85
+ /**
86
+ * (Safe copy) Prevents the addition of new properties to an object.
87
+ */
88
+ const preventExtensions = _Object.preventExtensions;
89
+ /**
90
+ * (Safe copy) Gets the own property descriptor of the specified object.
91
+ */
92
+ const getOwnPropertyDescriptor = _Object.getOwnPropertyDescriptor;
93
+ /**
94
+ * (Safe copy) Returns the names of the own properties of an object.
95
+ */
96
+ const getOwnPropertyNames = _Object.getOwnPropertyNames;
97
+ /**
98
+ * (Safe copy) Returns an array of all symbol properties found directly on object o.
99
+ */
100
+ const getOwnPropertySymbols = _Object.getOwnPropertySymbols;
101
+ /**
102
+ * (Safe copy) Gets the own property descriptors of the specified object.
103
+ */
104
+ const getOwnPropertyDescriptors = _Object.getOwnPropertyDescriptors;
105
+ /**
106
+ * (Safe copy) Safe wrapper for Object.prototype.hasOwnProperty.call().
107
+ * Checks if an object has a property as its own (not inherited) property.
108
+ *
109
+ * @param obj - The object to check.
110
+ * @param key - The property key to check.
111
+ * @returns True if the object has the property as its own property.
112
+ */
113
+ const hasOwn = (obj, key) => _Reflect.apply(_hasOwnProperty, obj, [key]);
114
+ /**
115
+ * (Safe copy) Safe wrapper for Object.prototype.toString.call().
116
+ * Returns the internal [[Class]] property of the object as a string tag.
117
+ *
118
+ * @param value - The value to get the type tag from.
119
+ * @returns The type tag string (e.g., "[object Array]").
120
+ */
121
+ const typeTag = (value) => _Reflect.apply(_toString, value, []);
122
+ /**
123
+ * (Safe copy) Namespace object containing all Object static methods.
124
+ * Note: Importing this imports all methods in this namespace (no tree-shaking).
125
+ */
126
+ const Object$1 = _Object.freeze({
127
+ freeze,
128
+ create,
129
+ keys,
130
+ entries,
131
+ values,
132
+ fromEntries,
133
+ assign,
134
+ defineProperty,
135
+ defineProperties,
136
+ hasOwn: objectHasOwn,
137
+ setPrototypeOf,
138
+ getPrototypeOf,
139
+ seal,
140
+ isFrozen,
141
+ isSealed,
142
+ isExtensible,
143
+ preventExtensions,
144
+ getOwnPropertyDescriptor,
145
+ getOwnPropertyNames,
146
+ getOwnPropertySymbols,
147
+ getOwnPropertyDescriptors,
148
+ });
149
+
150
+ exports.Object = Object$1;
151
+ exports.assign = assign;
152
+ exports.create = create;
153
+ exports.defineProperties = defineProperties;
154
+ exports.defineProperty = defineProperty;
155
+ exports.entries = entries;
156
+ exports.freeze = freeze;
157
+ exports.fromEntries = fromEntries;
158
+ exports.getOwnPropertyDescriptor = getOwnPropertyDescriptor;
159
+ exports.getOwnPropertyDescriptors = getOwnPropertyDescriptors;
160
+ exports.getOwnPropertyNames = getOwnPropertyNames;
161
+ exports.getOwnPropertySymbols = getOwnPropertySymbols;
162
+ exports.getPrototypeOf = getPrototypeOf;
163
+ exports.hasOwn = hasOwn;
164
+ exports.isExtensible = isExtensible;
165
+ exports.isFrozen = isFrozen;
166
+ exports.isSealed = isSealed;
167
+ exports.keys = keys;
168
+ exports.objectHasOwn = objectHasOwn;
169
+ exports.preventExtensions = preventExtensions;
170
+ exports.seal = seal;
171
+ exports.setPrototypeOf = setPrototypeOf;
172
+ exports.typeTag = typeTag;
173
+ exports.values = values;
174
+ //# sourceMappingURL=index.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../../../../../../../../../libs/utils/immutable-api/src/built-in-copy/object/index.ts"],"sourcesContent":[null],"names":["Object"],"mappings":";;AAAA;;;;;;;AAOG;AAEH;AACA,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM;AACjC,MAAM,QAAQ,GAAG,UAAU,CAAC,OAAO;AACnC,MAAM,gBAAgB,GAAG,OAAO,CAAC,SAAS;AAC1C,MAAM,eAAe,GAAG,gBAAgB,CAAC,cAAc;AACvD,MAAM,SAAS,GAAG,gBAAgB,CAAC,QAAQ;AAE3C;;;AAGG;AACI,MAAM,MAAM,GAAG,OAAO,CAAC;AAE9B;;AAEG;AACI,MAAM,MAAM,GAAG,OAAO,CAAC;AAE9B;;AAEG;AACI,MAAM,IAAI,GAAG,OAAO,CAAC;AAE5B;;AAEG;AACI,MAAM,OAAO,GAAG,OAAO,CAAC;AAE/B;;AAEG;AACI,MAAM,MAAM,GAAG,OAAO,CAAC;AAE9B;;AAEG;AACI,MAAM,WAAW,GAAG,OAAO,CAAC;AAEnC;;;AAGG;AACI,MAAM,MAAM,GAAG,OAAO,CAAC;AAE9B;;AAEG;AACI,MAAM,cAAc,GAAG,OAAO,CAAC;AAEtC;;AAEG;AACI,MAAM,gBAAgB,GAAG,OAAO,CAAC;AAExC;;AAEG;AACI,MAAM,YAAY,GAAG,OAAO,CAAC;AAEpC;;AAEG;AACI,MAAM,cAAc,GAAG,OAAO,CAAC;AAEtC;;AAEG;AACI,MAAM,cAAc,GAAG,OAAO,CAAC;AAEtC;;AAEG;AACI,MAAM,IAAI,GAAG,OAAO,CAAC;AAE5B;;;AAGG;AACI,MAAM,QAAQ,GAAG,OAAO,CAAC;AAEhC;;;AAGG;AACI,MAAM,QAAQ,GAAG,OAAO,CAAC;AAEhC;;AAEG;AACI,MAAM,YAAY,GAAG,OAAO,CAAC;AAEpC;;AAEG;AACI,MAAM,iBAAiB,GAAG,OAAO,CAAC;AAEzC;;AAEG;AACI,MAAM,wBAAwB,GAAG,OAAO,CAAC;AAEhD;;AAEG;AACI,MAAM,mBAAmB,GAAG,OAAO,CAAC;AAE3C;;AAEG;AACI,MAAM,qBAAqB,GAAG,OAAO,CAAC;AAE7C;;AAEG;AACI,MAAM,yBAAyB,GAAG,OAAO,CAAC;AAEjD;;;;;;;AAOG;MACU,MAAM,GAAG,CAAC,GAAW,EAAE,GAAgB,KAAuB,QAAQ,CAAC,KAAK,CAAC,eAAe,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC;AAErH;;;;;;AAMG;AACI,MAAM,OAAO,GAAG,CAAC,KAAc,KAAqB,QAAQ,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE;AAE9F;;;AAGG;AACI,MAAMA,QAAM,GAAG,OAAO,CAAC,MAAM,CAAQ;IAC1C,MAAM;IACN,MAAM;IACN,IAAI;IACJ,OAAO;IACP,MAAM;IACN,WAAW;IACX,MAAM;IACN,cAAc;IACd,gBAAgB;AAChB,IAAA,MAAM,EAAE,YAAY;IACpB,cAAc;IACd,cAAc;IACd,IAAI;IACJ,QAAQ;IACR,QAAQ;IACR,YAAY;IACZ,iBAAiB;IACjB,wBAAwB;IACxB,mBAAmB;IACnB,qBAAqB;IACrB,yBAAyB;AAC1B,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;"}