@spscommerce/utils 5.10.5-ie → 5.10.5-ie.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 (275) hide show
  1. package/dist/out-tsc/array/flatten.d.ts +1 -0
  2. package/dist/out-tsc/array/flatten.js +7 -0
  3. package/dist/out-tsc/array/flatten.js.map +1 -0
  4. package/dist/out-tsc/array/flatten.spec.d.ts +1 -0
  5. package/dist/out-tsc/array/flatten.spec.js +10 -0
  6. package/dist/out-tsc/array/flatten.spec.js.map +1 -0
  7. package/dist/out-tsc/array/index.d.ts +3 -0
  8. package/dist/out-tsc/array/index.js +4 -0
  9. package/dist/out-tsc/array/index.js.map +1 -0
  10. package/dist/out-tsc/array/is-subset.d.ts +4 -0
  11. package/dist/out-tsc/array/is-subset.js +41 -0
  12. package/dist/out-tsc/array/is-subset.js.map +1 -0
  13. package/dist/out-tsc/array/is-subset.spec.d.ts +1 -0
  14. package/dist/out-tsc/array/is-subset.spec.js +41 -0
  15. package/dist/out-tsc/array/is-subset.spec.js.map +1 -0
  16. package/dist/out-tsc/array/range.d.ts +5 -0
  17. package/dist/out-tsc/array/range.js +16 -0
  18. package/dist/out-tsc/array/range.js.map +1 -0
  19. package/dist/out-tsc/array/range.spec.d.ts +1 -0
  20. package/dist/out-tsc/array/range.spec.js +26 -0
  21. package/dist/out-tsc/array/range.spec.js.map +1 -0
  22. package/dist/out-tsc/classes/custom-event.d.ts +4 -0
  23. package/dist/out-tsc/classes/custom-event.js +87 -0
  24. package/dist/out-tsc/classes/custom-event.js.map +1 -0
  25. package/dist/out-tsc/classes/index.d.ts +1 -0
  26. package/dist/out-tsc/classes/index.js +2 -0
  27. package/dist/out-tsc/classes/index.js.map +1 -0
  28. package/dist/out-tsc/data/doctypes.d.ts +4 -0
  29. package/dist/out-tsc/data/doctypes.js +302 -0
  30. package/dist/out-tsc/data/doctypes.js.map +1 -0
  31. package/dist/out-tsc/data/index.d.ts +1 -0
  32. package/dist/out-tsc/data/index.js +2 -0
  33. package/dist/out-tsc/data/index.js.map +1 -0
  34. package/dist/out-tsc/decorators/cast-to-number.d.ts +5 -0
  35. package/dist/out-tsc/decorators/cast-to-number.js +29 -0
  36. package/dist/out-tsc/decorators/cast-to-number.js.map +1 -0
  37. package/dist/out-tsc/decorators/debounced.broken_spec.d.ts +0 -0
  38. package/dist/out-tsc/decorators/debounced.broken_spec.js +38 -0
  39. package/dist/out-tsc/decorators/debounced.broken_spec.js.map +1 -0
  40. package/dist/out-tsc/decorators/debounced.d.ts +11 -0
  41. package/dist/out-tsc/decorators/debounced.js +35 -0
  42. package/dist/out-tsc/decorators/debounced.js.map +1 -0
  43. package/dist/out-tsc/decorators/index.d.ts +5 -0
  44. package/dist/out-tsc/decorators/index.js +6 -0
  45. package/dist/out-tsc/decorators/index.js.map +1 -0
  46. package/dist/out-tsc/decorators/locked-to-animation-frames.d.ts +4 -0
  47. package/dist/out-tsc/decorators/locked-to-animation-frames.js +34 -0
  48. package/dist/out-tsc/decorators/locked-to-animation-frames.js.map +1 -0
  49. package/dist/out-tsc/decorators/locked-to-animation-frames.spec.d.ts +0 -0
  50. package/dist/out-tsc/decorators/locked-to-animation-frames.spec.js +63 -0
  51. package/dist/out-tsc/decorators/locked-to-animation-frames.spec.js.map +1 -0
  52. package/dist/out-tsc/decorators/simple-metadata-decorator-applicator.d.ts +11 -0
  53. package/dist/out-tsc/decorators/simple-metadata-decorator-applicator.js +80 -0
  54. package/dist/out-tsc/decorators/simple-metadata-decorator-applicator.js.map +1 -0
  55. package/dist/out-tsc/decorators/tick-delay.d.ts +6 -0
  56. package/dist/out-tsc/decorators/tick-delay.js +31 -0
  57. package/dist/out-tsc/decorators/tick-delay.js.map +1 -0
  58. package/dist/out-tsc/function/debounce.d.ts +9 -0
  59. package/dist/out-tsc/function/debounce.js +102 -0
  60. package/dist/out-tsc/function/debounce.js.map +1 -0
  61. package/dist/out-tsc/function/debounce.spec.d.ts +1 -0
  62. package/dist/out-tsc/function/debounce.spec.js +150 -0
  63. package/dist/out-tsc/function/debounce.spec.js.map +1 -0
  64. package/dist/out-tsc/function/debounced-function.interface.d.ts +10 -0
  65. package/dist/out-tsc/function/debounced-function.interface.js +2 -0
  66. package/dist/out-tsc/function/debounced-function.interface.js.map +1 -0
  67. package/dist/out-tsc/function/delayed-function.interface.d.ts +10 -0
  68. package/dist/out-tsc/function/delayed-function.interface.js +2 -0
  69. package/dist/out-tsc/function/delayed-function.interface.js.map +1 -0
  70. package/dist/out-tsc/function/index.d.ts +6 -0
  71. package/dist/out-tsc/function/index.js +7 -0
  72. package/dist/out-tsc/function/index.js.map +1 -0
  73. package/dist/out-tsc/function/lock-to-animation-frames.d.ts +7 -0
  74. package/dist/out-tsc/function/lock-to-animation-frames.js +43 -0
  75. package/dist/out-tsc/function/lock-to-animation-frames.js.map +1 -0
  76. package/dist/out-tsc/function/lock-to-animation-frames.spec.d.ts +0 -0
  77. package/dist/out-tsc/function/lock-to-animation-frames.spec.js +53 -0
  78. package/dist/out-tsc/function/lock-to-animation-frames.spec.js.map +1 -0
  79. package/dist/out-tsc/function/on-next-tick.d.ts +8 -0
  80. package/dist/out-tsc/function/on-next-tick.js +12 -0
  81. package/dist/out-tsc/function/on-next-tick.js.map +1 -0
  82. package/dist/out-tsc/function/on-next-tick.spec.d.ts +1 -0
  83. package/dist/out-tsc/function/on-next-tick.spec.js +13 -0
  84. package/dist/out-tsc/function/on-next-tick.spec.js.map +1 -0
  85. package/dist/out-tsc/function/op.d.ts +32 -0
  86. package/dist/out-tsc/function/op.js +34 -0
  87. package/dist/out-tsc/function/op.js.map +1 -0
  88. package/dist/out-tsc/function/op.spec.d.ts +1 -0
  89. package/dist/out-tsc/function/op.spec.js +94 -0
  90. package/dist/out-tsc/function/op.spec.js.map +1 -0
  91. package/dist/out-tsc/index.d.ts +9 -0
  92. package/dist/out-tsc/index.js +10 -0
  93. package/dist/out-tsc/index.js.map +1 -0
  94. package/dist/out-tsc/number/constrain.d.ts +7 -0
  95. package/dist/out-tsc/number/constrain.js +16 -0
  96. package/dist/out-tsc/number/constrain.js.map +1 -0
  97. package/dist/out-tsc/number/decimal-round.d.ts +7 -0
  98. package/dist/out-tsc/number/decimal-round.js +19 -0
  99. package/dist/out-tsc/number/decimal-round.js.map +1 -0
  100. package/dist/out-tsc/number/decimal-round.spec.d.ts +1 -0
  101. package/dist/out-tsc/number/decimal-round.spec.js +10 -0
  102. package/dist/out-tsc/number/decimal-round.spec.js.map +1 -0
  103. package/dist/out-tsc/number/index.d.ts +3 -0
  104. package/dist/out-tsc/number/index.js +4 -0
  105. package/dist/out-tsc/number/index.js.map +1 -0
  106. package/dist/out-tsc/number/to-file-size-string.d.ts +5 -0
  107. package/dist/out-tsc/number/to-file-size-string.js +24 -0
  108. package/dist/out-tsc/number/to-file-size-string.js.map +1 -0
  109. package/dist/out-tsc/object/copy-property.d.ts +6 -0
  110. package/dist/out-tsc/object/copy-property.js +9 -0
  111. package/dist/out-tsc/object/copy-property.js.map +1 -0
  112. package/dist/out-tsc/object/copy-property.spec.d.ts +1 -0
  113. package/dist/out-tsc/object/copy-property.spec.js +16 -0
  114. package/dist/out-tsc/object/copy-property.spec.js.map +1 -0
  115. package/dist/out-tsc/object/crumble-path.d.ts +6 -0
  116. package/dist/out-tsc/object/crumble-path.js +9 -0
  117. package/dist/out-tsc/object/crumble-path.js.map +1 -0
  118. package/dist/out-tsc/object/crumble-path.spec.d.ts +1 -0
  119. package/dist/out-tsc/object/crumble-path.spec.js +24 -0
  120. package/dist/out-tsc/object/crumble-path.spec.js.map +1 -0
  121. package/dist/out-tsc/object/deep-freeze.d.ts +1 -0
  122. package/dist/out-tsc/object/deep-freeze.js +36 -0
  123. package/dist/out-tsc/object/deep-freeze.js.map +1 -0
  124. package/dist/out-tsc/object/deep-freeze.spec.d.ts +1 -0
  125. package/dist/out-tsc/object/deep-freeze.spec.js +14 -0
  126. package/dist/out-tsc/object/deep-freeze.spec.js.map +1 -0
  127. package/dist/out-tsc/object/diff.d.ts +12 -0
  128. package/dist/out-tsc/object/diff.js +92 -0
  129. package/dist/out-tsc/object/diff.js.map +1 -0
  130. package/dist/out-tsc/object/diff.spec.d.ts +1 -0
  131. package/dist/out-tsc/object/diff.spec.js +40 -0
  132. package/dist/out-tsc/object/diff.spec.js.map +1 -0
  133. package/dist/out-tsc/object/for-each-entry-deep.d.ts +4 -0
  134. package/dist/out-tsc/object/for-each-entry-deep.js +38 -0
  135. package/dist/out-tsc/object/for-each-entry-deep.js.map +1 -0
  136. package/dist/out-tsc/object/for-each-entry-deep.spec.d.ts +1 -0
  137. package/dist/out-tsc/object/for-each-entry-deep.spec.js +24 -0
  138. package/dist/out-tsc/object/for-each-entry-deep.spec.js.map +1 -0
  139. package/dist/out-tsc/object/for-each-nested-object.d.ts +4 -0
  140. package/dist/out-tsc/object/for-each-nested-object.js +38 -0
  141. package/dist/out-tsc/object/for-each-nested-object.js.map +1 -0
  142. package/dist/out-tsc/object/for-each-nested-object.spec.d.ts +1 -0
  143. package/dist/out-tsc/object/for-each-nested-object.spec.js +46 -0
  144. package/dist/out-tsc/object/for-each-nested-object.spec.js.map +1 -0
  145. package/dist/out-tsc/object/get-path.d.ts +5 -0
  146. package/dist/out-tsc/object/get-path.js +67 -0
  147. package/dist/out-tsc/object/get-path.js.map +1 -0
  148. package/dist/out-tsc/object/get-path.spec.d.ts +1 -0
  149. package/dist/out-tsc/object/get-path.spec.js +44 -0
  150. package/dist/out-tsc/object/get-path.spec.js.map +1 -0
  151. package/dist/out-tsc/object/index.d.ts +13 -0
  152. package/dist/out-tsc/object/index.js +14 -0
  153. package/dist/out-tsc/object/index.js.map +1 -0
  154. package/dist/out-tsc/object/merge-deep.d.ts +4 -0
  155. package/dist/out-tsc/object/merge-deep.js +60 -0
  156. package/dist/out-tsc/object/merge-deep.js.map +1 -0
  157. package/dist/out-tsc/object/merge-deep.spec.d.ts +1 -0
  158. package/dist/out-tsc/object/merge-deep.spec.js +16 -0
  159. package/dist/out-tsc/object/merge-deep.spec.js.map +1 -0
  160. package/dist/out-tsc/object/merge-properties-deep.d.ts +4 -0
  161. package/dist/out-tsc/object/merge-properties-deep.js +61 -0
  162. package/dist/out-tsc/object/merge-properties-deep.js.map +1 -0
  163. package/dist/out-tsc/object/merge-properties-deep.spec.d.ts +1 -0
  164. package/dist/out-tsc/object/merge-properties-deep.spec.js +24 -0
  165. package/dist/out-tsc/object/merge-properties-deep.spec.js.map +1 -0
  166. package/dist/out-tsc/object/omit.d.ts +1 -0
  167. package/dist/out-tsc/object/omit.js +40 -0
  168. package/dist/out-tsc/object/omit.js.map +1 -0
  169. package/dist/out-tsc/object/omit.spec.d.ts +1 -0
  170. package/dist/out-tsc/object/omit.spec.js +10 -0
  171. package/dist/out-tsc/object/omit.spec.js.map +1 -0
  172. package/dist/out-tsc/object/set-path.d.ts +2 -0
  173. package/dist/out-tsc/object/set-path.js +45 -0
  174. package/dist/out-tsc/object/set-path.js.map +1 -0
  175. package/dist/out-tsc/object/set-path.spec.d.ts +1 -0
  176. package/dist/out-tsc/object/set-path.spec.js +36 -0
  177. package/dist/out-tsc/object/set-path.spec.js.map +1 -0
  178. package/dist/out-tsc/object/traverse-path.d.ts +2 -0
  179. package/dist/out-tsc/object/traverse-path.js +81 -0
  180. package/dist/out-tsc/object/traverse-path.js.map +1 -0
  181. package/dist/out-tsc/object/values.d.ts +2 -0
  182. package/dist/out-tsc/object/values.js +31 -0
  183. package/dist/out-tsc/object/values.js.map +1 -0
  184. package/dist/out-tsc/object/values.spec.d.ts +1 -0
  185. package/dist/out-tsc/object/values.spec.js +7 -0
  186. package/dist/out-tsc/object/values.spec.js.map +1 -0
  187. package/dist/out-tsc/string/code.template-tag.d.ts +2 -0
  188. package/dist/out-tsc/string/code.template-tag.js +38 -0
  189. package/dist/out-tsc/string/code.template-tag.js.map +1 -0
  190. package/dist/out-tsc/string/index.d.ts +3 -0
  191. package/dist/out-tsc/string/index.js +4 -0
  192. package/dist/out-tsc/string/index.js.map +1 -0
  193. package/dist/out-tsc/string/parse-file-size.d.ts +5 -0
  194. package/dist/out-tsc/string/parse-file-size.js +43 -0
  195. package/dist/out-tsc/string/parse-file-size.js.map +1 -0
  196. package/dist/out-tsc/string/template.d.ts +15 -0
  197. package/dist/out-tsc/string/template.js +28 -0
  198. package/dist/out-tsc/string/template.js.map +1 -0
  199. package/dist/out-tsc/string/template.spec.d.ts +1 -0
  200. package/dist/out-tsc/string/template.spec.js +39 -0
  201. package/dist/out-tsc/string/template.spec.js.map +1 -0
  202. package/dist/out-tsc/typings.d.ts +1 -0
  203. package/dist/out-tsc/typings.js +2 -0
  204. package/dist/out-tsc/typings.js.map +1 -0
  205. package/lib/array/flatten.d.ts +1 -0
  206. package/lib/array/flatten.spec.d.ts +1 -0
  207. package/lib/array/index.d.ts +3 -0
  208. package/lib/array/is-subset.d.ts +4 -0
  209. package/lib/array/is-subset.spec.d.ts +1 -0
  210. package/lib/array/range.d.ts +5 -0
  211. package/lib/array/range.spec.d.ts +1 -0
  212. package/lib/classes/custom-event.d.ts +4 -0
  213. package/lib/classes/index.d.ts +1 -0
  214. package/lib/data/doctypes.d.ts +4 -0
  215. package/lib/data/index.d.ts +1 -0
  216. package/lib/decorators/cast-to-number.d.ts +5 -0
  217. package/lib/decorators/debounced.broken_spec.d.ts +0 -0
  218. package/lib/decorators/debounced.d.ts +11 -0
  219. package/lib/decorators/index.d.ts +5 -0
  220. package/lib/decorators/locked-to-animation-frames.d.ts +4 -0
  221. package/lib/decorators/locked-to-animation-frames.spec.d.ts +0 -0
  222. package/lib/decorators/simple-metadata-decorator-applicator.d.ts +11 -0
  223. package/lib/decorators/tick-delay.d.ts +6 -0
  224. package/lib/function/debounce.d.ts +9 -0
  225. package/lib/function/debounce.spec.d.ts +1 -0
  226. package/lib/function/debounced-function.interface.d.ts +10 -0
  227. package/lib/function/delayed-function.interface.d.ts +10 -0
  228. package/lib/function/index.d.ts +6 -0
  229. package/lib/function/lock-to-animation-frames.d.ts +7 -0
  230. package/lib/function/lock-to-animation-frames.spec.d.ts +0 -0
  231. package/lib/function/on-next-tick.d.ts +8 -0
  232. package/lib/function/on-next-tick.spec.d.ts +1 -0
  233. package/lib/function/op.d.ts +32 -0
  234. package/lib/function/op.spec.d.ts +1 -0
  235. package/lib/index.cjs.js +2437 -0
  236. package/lib/index.d.ts +9 -0
  237. package/lib/index.es.js +2399 -0
  238. package/lib/number/constrain.d.ts +7 -0
  239. package/lib/number/decimal-round.d.ts +7 -0
  240. package/lib/number/decimal-round.spec.d.ts +1 -0
  241. package/lib/number/index.d.ts +3 -0
  242. package/lib/number/to-file-size-string.d.ts +5 -0
  243. package/lib/object/copy-property.d.ts +6 -0
  244. package/lib/object/copy-property.spec.d.ts +1 -0
  245. package/lib/object/crumble-path.d.ts +6 -0
  246. package/lib/object/crumble-path.spec.d.ts +1 -0
  247. package/lib/object/deep-freeze.d.ts +1 -0
  248. package/lib/object/deep-freeze.spec.d.ts +1 -0
  249. package/lib/object/diff.d.ts +12 -0
  250. package/lib/object/diff.spec.d.ts +1 -0
  251. package/lib/object/for-each-entry-deep.d.ts +4 -0
  252. package/lib/object/for-each-entry-deep.spec.d.ts +1 -0
  253. package/lib/object/for-each-nested-object.d.ts +4 -0
  254. package/lib/object/for-each-nested-object.spec.d.ts +1 -0
  255. package/lib/object/get-path.d.ts +5 -0
  256. package/lib/object/get-path.spec.d.ts +1 -0
  257. package/lib/object/index.d.ts +13 -0
  258. package/lib/object/merge-deep.d.ts +4 -0
  259. package/lib/object/merge-deep.spec.d.ts +1 -0
  260. package/lib/object/merge-properties-deep.d.ts +4 -0
  261. package/lib/object/merge-properties-deep.spec.d.ts +1 -0
  262. package/lib/object/omit.d.ts +1 -0
  263. package/lib/object/omit.spec.d.ts +1 -0
  264. package/lib/object/set-path.d.ts +2 -0
  265. package/lib/object/set-path.spec.d.ts +1 -0
  266. package/lib/object/traverse-path.d.ts +2 -0
  267. package/lib/object/values.d.ts +2 -0
  268. package/lib/object/values.spec.d.ts +1 -0
  269. package/lib/string/code.template-tag.d.ts +2 -0
  270. package/lib/string/index.d.ts +3 -0
  271. package/lib/string/parse-file-size.d.ts +5 -0
  272. package/lib/string/template.d.ts +15 -0
  273. package/lib/string/template.spec.d.ts +1 -0
  274. package/lib/typings.d.ts +1 -0
  275. package/package.json +1 -1
@@ -0,0 +1,31 @@
1
+ var __values = (this && this.__values) || function(o) {
2
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
3
+ if (m) return m.call(o);
4
+ if (o && typeof o.length === "number") return {
5
+ next: function () {
6
+ if (o && i >= o.length) o = void 0;
7
+ return { value: o && o[i++], done: !o };
8
+ }
9
+ };
10
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
11
+ };
12
+ /** Returns the values of an object. */
13
+ export function values(object) {
14
+ var e_1, _a;
15
+ var vals = [];
16
+ try {
17
+ for (var _b = __values(Object.keys(object)), _c = _b.next(); !_c.done; _c = _b.next()) {
18
+ var key = _c.value;
19
+ vals.push(object[key]);
20
+ }
21
+ }
22
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
23
+ finally {
24
+ try {
25
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
26
+ }
27
+ finally { if (e_1) throw e_1.error; }
28
+ }
29
+ return vals;
30
+ }
31
+ //# sourceMappingURL=values.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"values.js","sourceRoot":"","sources":["../../../src/object/values.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,uCAAuC;AACvC,MAAM,UAAU,MAAM,CAAC,MAAW;;IAChC,IAAM,IAAI,GAAG,EAAE,CAAC;;QAChB,KAAkB,IAAA,KAAA,SAAA,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA,gBAAA,4BAAE;YAAlC,IAAM,GAAG,WAAA;YACZ,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;SACxB;;;;;;;;;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ import { values } from "./values";
2
+ describe("values", function () {
3
+ test("retrieves the values of an object", function () {
4
+ expect(values({ a: 10, b: "foo" })).toEqual([10, "foo"]);
5
+ });
6
+ });
7
+ //# sourceMappingURL=values.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"values.spec.js","sourceRoot":"","sources":["../../../src/object/values.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,QAAQ,CAAC,QAAQ,EAAE;IACjB,IAAI,CAAC,mCAAmC,EAAE;QACxC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC;IAC3D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ /** Template tag function for making strings containing code blocks easier to deal with. */
2
+ export declare function code(strings: TemplateStringsArray, ...interpolations: unknown[]): string;
@@ -0,0 +1,38 @@
1
+ var __read = (this && this.__read) || function (o, n) {
2
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
3
+ if (!m) return o;
4
+ var i = m.call(o), r, ar = [], e;
5
+ try {
6
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
7
+ }
8
+ catch (error) { e = { error: error }; }
9
+ finally {
10
+ try {
11
+ if (r && !r.done && (m = i["return"])) m.call(i);
12
+ }
13
+ finally { if (e) throw e.error; }
14
+ }
15
+ return ar;
16
+ };
17
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
18
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
19
+ if (ar || !(i in from)) {
20
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
21
+ ar[i] = from[i];
22
+ }
23
+ }
24
+ return to.concat(ar || Array.prototype.slice.call(from));
25
+ };
26
+ /** Template tag function for making strings containing code blocks easier to deal with. */
27
+ export function code(strings) {
28
+ var interpolations = [];
29
+ for (var _i = 1; _i < arguments.length; _i++) {
30
+ interpolations[_i - 1] = arguments[_i];
31
+ }
32
+ var s = strings.reduce(function (a, b, i) { return "" + a + (i <= interpolations.length ? String(interpolations[i - 1]) : "") + b; });
33
+ var leadingWhitespace = Math.min.apply(Math, __spreadArray([], __read(s.split(/[\r\n]/)
34
+ .filter(function (l) { return l.trim(); })
35
+ .map(function (l) { return (/^ */.exec(l))[0].length; })), false));
36
+ return s.replace(new RegExp("^ {" + leadingWhitespace + "}", "gm"), "").trim();
37
+ }
38
+ //# sourceMappingURL=code.template-tag.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code.template-tag.js","sourceRoot":"","sources":["../../../src/string/code.template-tag.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2FAA2F;AAC3F,MAAM,UAAU,IAAI,CAAC,OAA6B;IAAE,wBAA4B;SAA5B,UAA4B,EAA5B,qBAA4B,EAA5B,IAA4B;QAA5B,uCAA4B;;IAC9E,IAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,UAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAK,OAAA,KAAG,CAAC,IAAG,CAAC,IAAI,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,IAAG,CAAG,EAA5E,CAA4E,CAAC,CAAC;IACpH,IAAM,iBAAiB,GAAG,IAAI,CAAC,GAAG,OAAR,IAAI,2BACzB,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC;SACjB,MAAM,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,IAAI,EAAE,EAAR,CAAQ,CAAC;SACvB,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,EAAzB,CAAyB,CAAC,UACzC,CAAC;IACF,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,QAAM,iBAAiB,MAAG,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;AAC5E,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./code.template-tag";
2
+ export * from "./parse-file-size";
3
+ export * from "./template";
@@ -0,0 +1,4 @@
1
+ export * from "./code.template-tag";
2
+ export * from "./parse-file-size";
3
+ export * from "./template";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/string/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Parses a string as a file size and returns the size in bytes. For example,
3
+ * `parseFileSize("2KB")` will return `2048`.
4
+ */
5
+ export declare function parseFileSize(fileSize: string): number;
@@ -0,0 +1,43 @@
1
+ var __read = (this && this.__read) || function (o, n) {
2
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
3
+ if (!m) return o;
4
+ var i = m.call(o), r, ar = [], e;
5
+ try {
6
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
7
+ }
8
+ catch (error) { e = { error: error }; }
9
+ finally {
10
+ try {
11
+ if (r && !r.done && (m = i["return"])) m.call(i);
12
+ }
13
+ finally { if (e) throw e.error; }
14
+ }
15
+ return ar;
16
+ };
17
+ /**
18
+ * Parses a string as a file size and returns the size in bytes. For example,
19
+ * `parseFileSize("2KB")` will return `2048`.
20
+ */
21
+ export function parseFileSize(fileSize) {
22
+ var unitMatch = /[A-Z]?B$/.exec(fileSize);
23
+ if (!unitMatch) {
24
+ throw new Error("Input to parseFileSize (\"" + fileSize + "\") doesn't seem like a file size; "
25
+ + "cannot identify a unit (e.g. KB, GB)");
26
+ }
27
+ var _a = __read(unitMatch, 1), unit = _a[0];
28
+ var num = Number(fileSize.replace(unit, ""));
29
+ if (Number.isNaN(num)) {
30
+ throw new Error("Could not parse a number out of input to parseFileSize (\"" + fileSize + "\")");
31
+ }
32
+ var magnitude = ["B",
33
+ "KB",
34
+ "MB",
35
+ "GB",
36
+ "TB",
37
+ "PB"].indexOf(unit);
38
+ if (magnitude === -1) {
39
+ throw new Error("parseFileSize does not support units above PB");
40
+ }
41
+ return Math.ceil(num * (Math.pow(1024, magnitude)));
42
+ }
43
+ //# sourceMappingURL=parse-file-size.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse-file-size.js","sourceRoot":"","sources":["../../../src/string/parse-file-size.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,QAAgB;IAC5C,IAAM,SAAS,GAAG,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC5C,IAAI,CAAC,SAAS,EAAE;QACd,MAAM,IAAI,KAAK,CACb,+BAA4B,QAAQ,wCAAoC;cAChE,sCAAsC,CAC/C,CAAC;KACH;IAEK,IAAA,KAAA,OAAS,SAAS,IAAA,EAAjB,IAAI,QAAa,CAAC;IACzB,IAAM,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;IAC/C,IAAI,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;QACrB,MAAM,IAAI,KAAK,CAAC,+DAA4D,QAAQ,QAAI,CAAC,CAAC;KAC3F;IAED,IAAM,SAAS,GAAG,CAAC,GAAG;QACpB,IAAI;QACJ,IAAI;QACJ,IAAI;QACJ,IAAI;QACJ,IAAI,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACtB,IAAI,SAAS,KAAK,CAAC,CAAC,EAAE;QACpB,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;KAClE;IAED,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,SAAA,IAAI,EAAI,SAAS,CAAA,CAAC,CAAC,CAAC;AAC9C,CAAC"}
@@ -0,0 +1,15 @@
1
+ declare type TemplateFn = (data: any) => string;
2
+ /**
3
+ * Every string templating thing out there whether lodash, doT, handlebars, etc
4
+ * is extremely complicated to cover a variety of use cases. This just has two
5
+ * very simple features and great caution should be exercised in making it any more
6
+ * complex than that. A value can be interpolated like so:
7
+ * `<%= foo.bar %>`
8
+ * And a basic "if" conditional can be used like so:
9
+ * `<%? a?.b?.c %>This part will only appear if a.b.c is truthy!</%>`
10
+ * You can put interpolations inside a conditional, as you'd expect. That's it.
11
+ */
12
+ export declare function template(string: string): TemplateFn;
13
+ export declare function isTemplate(x: any): x is string;
14
+ export declare function isTemplateFn(x: any): x is TemplateFn;
15
+ export {};
@@ -0,0 +1,28 @@
1
+ import { getPath } from "../object";
2
+ var REGEX_REPLACEMENT = /(<%=|{{)(.+?)(%>|}})/g;
3
+ var REGEX_IF = /<%\?(.+?)%>(.+?)<\/%>/g;
4
+ var SYMBOL_TEMPLATE_SOURCE = Symbol("sps.utils.templateSrc");
5
+ /**
6
+ * Every string templating thing out there whether lodash, doT, handlebars, etc
7
+ * is extremely complicated to cover a variety of use cases. This just has two
8
+ * very simple features and great caution should be exercised in making it any more
9
+ * complex than that. A value can be interpolated like so:
10
+ * `<%= foo.bar %>`
11
+ * And a basic "if" conditional can be used like so:
12
+ * `<%? a?.b?.c %>This part will only appear if a.b.c is truthy!</%>`
13
+ * You can put interpolations inside a conditional, as you'd expect. That's it.
14
+ */
15
+ export function template(string) {
16
+ var fn = function (data) { return string
17
+ .replace(REGEX_IF, function (match, pathToCheck, content) { return (getPath(data, pathToCheck.trim()) ? content : ""); })
18
+ .replace(REGEX_REPLACEMENT, function (match, _, pathToInterpolate) { return getPath(data, pathToInterpolate.trim(), ""); }); };
19
+ fn[SYMBOL_TEMPLATE_SOURCE] = string;
20
+ return fn;
21
+ }
22
+ export function isTemplate(x) {
23
+ return typeof x === "string" && (REGEX_REPLACEMENT.test(x) || REGEX_IF.test(x));
24
+ }
25
+ export function isTemplateFn(x) {
26
+ return typeof x === "function" && Object.prototype.hasOwnProperty.call(x, SYMBOL_TEMPLATE_SOURCE);
27
+ }
28
+ //# sourceMappingURL=template.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template.js","sourceRoot":"","sources":["../../../src/string/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,IAAM,iBAAiB,GAAG,uBAAuB,CAAC;AAClD,IAAM,QAAQ,GAAG,wBAAwB,CAAC;AAE1C,IAAM,sBAAsB,GAAG,MAAM,CAAC,uBAAuB,CAAC,CAAC;AAI/D;;;;;;;;;GASG;AACH,MAAM,UAAU,QAAQ,CAAC,MAAc;IACrC,IAAM,EAAE,GAAG,UAAC,IAAS,IAAK,OAAA,MAAM;SAC7B,OAAO,CAAC,QAAQ,EAAE,UAAC,KAAK,EAAE,WAAW,EAAE,OAAO,IAAK,OAAA,CAAC,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAlD,CAAkD,CAAC;SACtG,OAAO,CAAC,iBAAiB,EAAE,UAAC,KAAK,EAAE,CAAC,EAAE,iBAAiB,IAAK,OAAA,OAAO,CAAC,IAAI,EAAE,iBAAiB,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAA3C,CAA2C,CAAC,EAFjF,CAEiF,CAAC;IAC5G,EAAE,CAAC,sBAAsB,CAAC,GAAG,MAAM,CAAC;IACpC,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,CAAM;IAC/B,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAClF,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,CAAM;IACjC,OAAO,OAAO,CAAC,KAAK,UAAU,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,sBAAsB,CAAC,CAAC;AACpG,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,39 @@
1
+ import { template } from "./template";
2
+ describe("template", function () {
3
+ test("correctly interpolates from data", function () {
4
+ var templateString = "test ---> <%= a.b %> <--- test";
5
+ var data = { a: { b: "foo" } };
6
+ var expected = "test ---> foo <--- test";
7
+ expect(template(templateString)(data)).toBe(expected);
8
+ });
9
+ test("correctly interpolates from data, alternate", function () {
10
+ var templateString = "test ---> {{a.b}} <--- test";
11
+ var data = { a: { b: "foo" } };
12
+ var expected = "test ---> foo <--- test";
13
+ expect(template(templateString)(data)).toBe(expected);
14
+ });
15
+ test("supports optional chaining", function () {
16
+ var templateString = "test ---> <%= a?.b %> <--- test";
17
+ var data = {};
18
+ var expected = "test ---> <--- test";
19
+ expect(template(templateString)(data)).toBe(expected);
20
+ });
21
+ test("throws if non-optional chaining breaks", function () {
22
+ var templateString = "test ---> <%= a.b %> <--- test";
23
+ var data = {};
24
+ expect(function () { return template(templateString)(data); }).toThrow();
25
+ });
26
+ test("removes falsy conditionals", function () {
27
+ var templateString = "test ---><%? a.c %> <%= a.b %> <--- test</%>";
28
+ var data = { a: { b: "foo" } };
29
+ var expected = "test --->";
30
+ expect(template(templateString)(data)).toBe(expected);
31
+ });
32
+ test("retains truthy conditionals & process any interpolations within", function () {
33
+ var templateString = "test ---><%? a.c %> <%= a.b %> <--- test</%>";
34
+ var data = { a: { b: "foo", c: true } };
35
+ var expected = "test ---> foo <--- test";
36
+ expect(template(templateString)(data)).toBe(expected);
37
+ });
38
+ });
39
+ //# sourceMappingURL=template.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template.spec.js","sourceRoot":"","sources":["../../../src/string/template.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,QAAQ,CAAC,UAAU,EAAE;IACnB,IAAI,CAAC,kCAAkC,EAAE;QACvC,IAAM,cAAc,GAAG,gCAAgC,CAAC;QACxD,IAAM,IAAI,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC;QACjC,IAAM,QAAQ,GAAG,yBAAyB,CAAC;QAC3C,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,6CAA6C,EAAE;QAClD,IAAM,cAAc,GAAG,6BAA6B,CAAC;QACrD,IAAM,IAAI,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC;QACjC,IAAM,QAAQ,GAAG,yBAAyB,CAAC;QAC3C,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,4BAA4B,EAAE;QACjC,IAAM,cAAc,GAAG,iCAAiC,CAAC;QACzD,IAAM,IAAI,GAAG,EAAE,CAAC;QAChB,IAAM,QAAQ,GAAG,sBAAsB,CAAC;QACxC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,wCAAwC,EAAE;QAC7C,IAAM,cAAc,GAAG,gCAAgC,CAAC;QACxD,IAAM,IAAI,GAAG,EAAE,CAAC;QAChB,MAAM,CAAC,cAAM,OAAA,QAAQ,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,EAA9B,CAA8B,CAAC,CAAC,OAAO,EAAE,CAAC;IACzD,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,4BAA4B,EAAE;QACjC,IAAM,cAAc,GAAG,8CAA8C,CAAC;QACtE,IAAM,IAAI,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC;QACjC,IAAM,QAAQ,GAAG,WAAW,CAAC;QAC7B,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,iEAAiE,EAAE;QACtE,IAAM,cAAc,GAAG,8CAA8C,CAAC;QACtE,IAAM,IAAI,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC;QAC1C,IAAM,QAAQ,GAAG,yBAAyB,CAAC;QAC3C,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export declare type Eventually<T> = T | Promise<T>;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=typings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typings.js","sourceRoot":"","sources":["../../src/typings.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export declare function flatten(arg: any): any;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ export * from "./flatten";
2
+ export * from "./is-subset";
3
+ export * from "./range";
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Tests if candidate is a subset of array
3
+ */
4
+ export declare function isSubset(candidate: any[], array: any[]): boolean;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Unlike lodash range, includes the specified end number.
3
+ * So range(1, 10) gives you 1-10 instead of 1-9.
4
+ */
5
+ export declare function range(start: number, end: number): number[];
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ /** docs:ignore */
2
+ export declare class CustomEvent {
3
+ constructor(eventName: string, initDict?: EventInit);
4
+ }
@@ -0,0 +1 @@
1
+ export * from "./custom-event";
@@ -0,0 +1,4 @@
1
+ export declare const EDI_DOCUMENT_TYPE: Readonly<Record<number, {
2
+ name: string;
3
+ edifactId?: string;
4
+ }>>;
@@ -0,0 +1 @@
1
+ export * from "./doctypes";
@@ -0,0 +1,5 @@
1
+ /**
2
+ * A property decorated with this will have any value assigned
3
+ * to it cast to a number with the unary `+` operator.
4
+ */
5
+ export declare function castToNumber(): PropertyDecorator;
File without changes
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Decorator that applies `debounce`
3
+ */
4
+ export declare function debounced(ms: number): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => {
5
+ configurable?: boolean;
6
+ enumerable?: boolean;
7
+ value?: any;
8
+ writable?: boolean;
9
+ get?(): any;
10
+ set?(v: any): void;
11
+ };
@@ -0,0 +1,5 @@
1
+ export * from "./cast-to-number";
2
+ export * from "./debounced";
3
+ export * from "./locked-to-animation-frames";
4
+ export * from "./simple-metadata-decorator-applicator";
5
+ export * from "./tick-delay";
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Decorator that applies `lockToAnimationFrames`
3
+ */
4
+ export declare function lockedToAnimationFrames(target: any, propertyKey: string, descriptor: PropertyDescriptor): PropertyDescriptor;
@@ -0,0 +1,11 @@
1
+ export declare type MetadataProperty<T, K = any> = T | ((classInstance: K) => T);
2
+ export declare type MetadataObject<K> = Record<string, MetadataProperty<any, K>>;
3
+ /**
4
+ * This would be simpler to understand as a factory that returns a decorator function,
5
+ * but TypeScript AoT compliation doesn't allow that. This lets you create a decorator
6
+ * that takes in a metadata object as an argument and assigns its values along with
7
+ * default values to the decorated method. The decorator will look like a standard
8
+ * decorator but calling this method and returning the result is the only thing it
9
+ * needs to do.
10
+ */
11
+ export declare function simpleMetadataDecoratorApplicator<T extends MetadataObject<K>, K>(metadata: Partial<T>, defaults: T, target: any, key: PropertyKey, descriptor: TypedPropertyDescriptor<K>): TypedPropertyDescriptor<K>;
@@ -0,0 +1,6 @@
1
+ interface FunctionPropertyDescriptor extends PropertyDescriptor {
2
+ value: (...args: unknown[]) => unknown;
3
+ }
4
+ /** Method decorator that configures the method to always run the tick after it's invoked */
5
+ export declare function tickDelay(target: any, propertyKey: string, descriptor: FunctionPropertyDescriptor): FunctionPropertyDescriptor;
6
+ export {};
@@ -0,0 +1,9 @@
1
+ import type { Eventually } from "../typings";
2
+ import type { DelayedFunction } from "./delayed-function.interface";
3
+ /**
4
+ * Takes in a function and returns a new function that debounces it.
5
+ * The returned function returns an observable that can be subscribed to
6
+ * if you need to have something happen when the debounced function
7
+ * finally gets called and returns a value.
8
+ */
9
+ export declare function debounce<T>(functionToDebounce: (...args: any[]) => Eventually<T>, milliseconds: number, thisArg?: any): DelayedFunction<Promise<T>>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ import type { DelayedFunction } from "./delayed-function.interface";
2
+ /** docs:ignore */
3
+ export interface DebouncedFunction<T> extends DelayedFunction<Promise<T>> {
4
+ (...args: any[]): Promise<T>;
5
+ _promise?: Promise<T>;
6
+ _promiseCallbacks?: {
7
+ resolve: any;
8
+ reject: any;
9
+ };
10
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * A function or method that has been passed to `debounce` or
3
+ * `lockToAnimationFrames`.
4
+ */
5
+ export interface DelayedFunction<T> {
6
+ (...args: any[]): T;
7
+ pending?: boolean;
8
+ reset?: () => boolean;
9
+ id?: number;
10
+ }
@@ -0,0 +1,6 @@
1
+ export * from "./debounce";
2
+ export * from "./debounced-function.interface";
3
+ export * from "./delayed-function.interface";
4
+ export * from "./lock-to-animation-frames";
5
+ export * from "./on-next-tick";
6
+ export * from "./op";
@@ -0,0 +1,7 @@
1
+ import type { DelayedFunction } from "./delayed-function.interface";
2
+ /**
3
+ * Return a new function to replace the passed in one which ensures that
4
+ * the given function will run only in `requestAnimationFrame()` and at
5
+ * most once per frame.
6
+ */
7
+ export declare function lockToAnimationFrames(functionToLock: () => any, thisArg?: any): DelayedFunction<any>;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Enqueues the given function to run on the next "tick" of the JS event
3
+ * loop cycle. If you ever encounter the "value changed after it was
4
+ * checked" error in Angular when trying to assign a value of a
5
+ * component class, performing that assignment on the next tick, i.e. when
6
+ * all of Angular's current cycle is finished, will resolve that error.
7
+ */
8
+ export declare function onNextTick(fn: (...args: unknown[]) => unknown, thisArg?: any): void;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Functions for various operators, most useful in combination
3
+ * with functional programming tools like map, filter, and reduce.
4
+ */
5
+ export declare const Op: {
6
+ add: (a: any, b: any) => any;
7
+ and: (a: any, b: any) => any;
8
+ band: (a: any, b: any) => number;
9
+ bor: (a: any, b: any) => number;
10
+ bxor: (a: any, b: any) => number;
11
+ bnot: (a: any) => number;
12
+ decr: (a: number) => number;
13
+ div: (a: number, b: number) => number;
14
+ eq: (a: any, b: any) => boolean;
15
+ exp: (a: number, b: number) => number;
16
+ gt: (a: any, b: any) => boolean;
17
+ gte: (a: any, b: any) => boolean;
18
+ incr: (a: number) => number;
19
+ lshift: (a: any, b: any) => number;
20
+ lt: (a: any, b: any) => boolean;
21
+ lte: (a: any, b: any) => boolean;
22
+ mul: (a: number, b: number) => number;
23
+ neg: (a: number) => number;
24
+ neq: (a: any, b: any) => boolean;
25
+ not: (a: any) => boolean;
26
+ or: (a: any, b: any) => any;
27
+ rem: (a: number, b: number) => number;
28
+ rshift: (a: any, b: any) => number;
29
+ rshift_zf: (a: any, b: any) => number;
30
+ sub: (a: number, b: number) => number;
31
+ xor: (a: any, b: any) => boolean;
32
+ };
@@ -0,0 +1 @@
1
+ export {};