@spscommerce/utils 5.20.2 → 5.20.3-ie

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 (209) 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/index.cjs.js +2437 -1
  206. package/lib/index.es.js +2268 -893
  207. package/package.json +5 -5
  208. package/rollup.config.js +22 -0
  209. package/vite.config.js +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doctypes.js","sourceRoot":"","sources":["../../../src/data/doctypes.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,iBAAiB,GAC0B,MAAM,CAAC,MAAM,CAAC;IACpE,GAAG,EAAE,EAAE,IAAI,EAAE,4BAA4B,EAAE;IAC3C,GAAG,EAAE,EAAE,IAAI,EAAE,wBAAwB,EAAE;IACvC,GAAG,EAAE,EAAE,IAAI,EAAE,0BAA0B,EAAE;IACzC,GAAG,EAAE,EAAE,IAAI,EAAE,6BAA6B,EAAE;IAC5C,GAAG,EAAE,EAAE,IAAI,EAAE,yCAAyC,EAAE;IACxD,GAAG,EAAE,EAAE,IAAI,EAAE,2CAA2C,EAAE;IAC1D,GAAG,EAAE,EAAE,IAAI,EAAE,wBAAwB,EAAE;IACvC,GAAG,EAAE,EAAE,IAAI,EAAE,iCAAiC,EAAE;IAChD,GAAG,EAAE,EAAE,IAAI,EAAE,wBAAwB,EAAE;IACvC,GAAG,EAAE,EAAE,IAAI,EAAE,wBAAwB,EAAE;IACvC,GAAG,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE;IAChC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AG,EAAE,EAAE,IAAI,EAAE,yCAAyC,EAAE;IACxD,GAAG,EAAE,EAAE,IAAI,EAAE,2BAA2B,EAAE;IAC1C,GAAG,EAAE,EAAE,IAAI,EAAE,uCAAuC,EAAE;IACtD,GAAG,EAAE,EAAE,IAAI,EAAE,yBAAyB,EAAE;IACxC,GAAG,EAAE,EAAE,IAAI,EAAE,2BAA2B,EAAE;IAC1C,GAAG,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE;IAC9B,GAAG,EAAE,EAAE,IAAI,EAAE,2BAA2B,EAAE,SAAS,EAAE,SAAS,EAAE;IAChE,GAAG,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE;IACjC,GAAG,EAAE,EAAE,IAAI,EAAE,+BAA+B,EAAE;CAC/C,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export * from "./doctypes";
@@ -0,0 +1,2 @@
1
+ export * from "./doctypes";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/data/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
@@ -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;
@@ -0,0 +1,29 @@
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 function castToNumber() {
6
+ return function (target, key) {
7
+ var _a;
8
+ var internalKey = "_" + String(key);
9
+ Object.defineProperties(target, (_a = {},
10
+ _a[internalKey] = {
11
+ enumerable: false,
12
+ configurable: true,
13
+ writable: true,
14
+ value: undefined,
15
+ },
16
+ _a[key] = {
17
+ enumerable: true,
18
+ configurable: true,
19
+ get: function () {
20
+ return this[internalKey];
21
+ },
22
+ set: function (newValue) {
23
+ this[internalKey] = Number(newValue);
24
+ },
25
+ },
26
+ _a));
27
+ };
28
+ }
29
+ //# sourceMappingURL=cast-to-number.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cast-to-number.js","sourceRoot":"","sources":["../../../src/decorators/cast-to-number.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO,UAAI,MAAS,EAAE,GAAY;;QAChC,IAAM,WAAW,GAAG,MAAI,MAAM,CAAC,GAAG,CAAG,CAAC;QACtC,MAAM,CAAC,gBAAgB,CAAC,MAAM;YAC5B,GAAC,WAAW,IAAG;gBACb,UAAU,EAAE,KAAK;gBACjB,YAAY,EAAE,IAAI;gBAClB,QAAQ,EAAE,IAAI;gBACd,KAAK,EAAE,SAAS;aACjB;YACD,GAAC,GAAG,IAAG;gBACL,UAAU,EAAE,IAAI;gBAChB,YAAY,EAAE,IAAI;gBAClB,GAAG,EAAH;oBACE,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC;gBAC3B,CAAC;gBACD,GAAG,EAAH,UAAI,QAAyB;oBAC3B,IAAI,CAAC,WAAW,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;gBACvC,CAAC;aACF;gBACD,CAAC;IACL,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,38 @@
1
+ /*
2
+ * TODO: Whoa, this was still trying to use angular testing stuff?! fix it
3
+ * import { fakeAsync, tick } from "@angular/core/testing";
4
+ */
5
+ // import { debounced } from "./debounced";
6
+ describe("debounced", function () {
7
+ /*
8
+ * test("debounces the decorated function", fakeAsync(() => {
9
+ * class Test {
10
+ * static fooRan = false;
11
+ */
12
+ /*
13
+ * @debounced(500)
14
+ * static foo() {
15
+ * Test.fooRan = true;
16
+ * }
17
+ * }
18
+ */
19
+ /*
20
+ * Test.foo();
21
+ * expect(Test.fooRan).toBe(false);
22
+ */
23
+ /*
24
+ * tick(499);
25
+ * expect(Test.fooRan).toBe(false);
26
+ * Test.foo();
27
+ */
28
+ /*
29
+ * tick(499);
30
+ * expect(Test.fooRan).toBe(false);
31
+ */
32
+ /*
33
+ * tick(1);
34
+ * expect(Test.fooRan).toBe(true);
35
+ * }));
36
+ */
37
+ });
38
+ //# sourceMappingURL=debounced.broken_spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debounced.broken_spec.js","sourceRoot":"","sources":["../../../src/decorators/debounced.broken_spec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,2CAA2C;AAE3C,QAAQ,CAAC,WAAW,EAAE;IACpB;;;;OAIG;IAEH;;;;;;OAMG;IAEH;;;OAGG;IAEH;;;;OAIG;IAEH;;;OAGG;IAEH;;;;OAIG;AACL,CAAC,CAAC,CAAC"}
@@ -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,35 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { debounce } from "../function";
13
+ /**
14
+ * Decorator that applies `debounce`
15
+ */
16
+ export function debounced(ms) {
17
+ return function (target, propertyKey, descriptor) {
18
+ var originalDescriptorCopy = __assign({}, descriptor);
19
+ originalDescriptorCopy.get = function get() {
20
+ /*
21
+ * Make a new copy each time; if you don't then every instance after the first
22
+ * one of the class containing the decorated method will break.
23
+ */
24
+ var newDescriptorWithDebounced = __assign({}, originalDescriptorCopy);
25
+ newDescriptorWithDebounced.value = debounce(originalDescriptorCopy.value, ms, this);
26
+ Object.defineProperty(this, propertyKey, newDescriptorWithDebounced);
27
+ return newDescriptorWithDebounced.value;
28
+ };
29
+ originalDescriptorCopy.configurable = true;
30
+ delete originalDescriptorCopy.writable;
31
+ delete originalDescriptorCopy.value;
32
+ return originalDescriptorCopy;
33
+ };
34
+ }
35
+ //# sourceMappingURL=debounced.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debounced.js","sourceRoot":"","sources":["../../../src/decorators/debounced.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,EAAU;IAClC,OAAO,UAAC,MAAW,EAAE,WAAmB,EAAE,UAA8B;QACtE,IAAM,sBAAsB,gBAAQ,UAAU,CAAE,CAAC;QACjD,sBAAsB,CAAC,GAAG,GAAG,SAAS,GAAG;YACvC;;;eAGG;YACH,IAAM,0BAA0B,gBAAQ,sBAAsB,CAAE,CAAC;YACjE,0BAA0B,CAAC,KAAK,GAAG,QAAQ,CAAC,sBAAsB,CAAC,KAAK,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;YACpF,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,WAAW,EAAE,0BAA0B,CAAC,CAAC;YACrE,OAAO,0BAA0B,CAAC,KAAK,CAAC;QAC1C,CAAC,CAAC;QACF,sBAAsB,CAAC,YAAY,GAAG,IAAI,CAAC;QAC3C,OAAO,sBAAsB,CAAC,QAAQ,CAAC;QACvC,OAAO,sBAAsB,CAAC,KAAK,CAAC;QACpC,OAAO,sBAAsB,CAAC;IAChC,CAAC,CAAC;AACJ,CAAC"}
@@ -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,6 @@
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";
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/decorators/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wCAAwC,CAAC;AACvD,cAAc,cAAc,CAAC"}
@@ -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,34 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ /* eslint-disable no-param-reassign */
13
+ import { lockToAnimationFrames } from "../function";
14
+ /**
15
+ * Decorator that applies `lockToAnimationFrames`
16
+ */
17
+ export function lockedToAnimationFrames(target, propertyKey, descriptor) {
18
+ var originalDescriptorCopy = __assign({}, descriptor);
19
+ descriptor.get = function get() {
20
+ /*
21
+ * Make a new copy each time; if you don't then every instance after the first
22
+ * one of the class containing the decorated method will break.
23
+ */
24
+ var newDescriptor = __assign({}, originalDescriptorCopy);
25
+ newDescriptor.value = lockToAnimationFrames(originalDescriptorCopy.value, this);
26
+ Object.defineProperty(this, propertyKey, newDescriptor);
27
+ return newDescriptor.value;
28
+ };
29
+ descriptor.configurable = true;
30
+ delete descriptor.writable;
31
+ delete descriptor.value;
32
+ return descriptor;
33
+ }
34
+ //# sourceMappingURL=locked-to-animation-frames.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locked-to-animation-frames.js","sourceRoot":"","sources":["../../../src/decorators/locked-to-animation-frames.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAsC;AACtC,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEpD;;GAEG;AACH,MAAM,UAAU,uBAAuB,CACrC,MAAW,EACX,WAAmB,EACnB,UAA8B;IAE9B,IAAM,sBAAsB,gBAAQ,UAAU,CAAE,CAAC;IACjD,UAAU,CAAC,GAAG,GAAG,SAAS,GAAG;QAC3B;;;WAGG;QACH,IAAM,aAAa,gBAAQ,sBAAsB,CAAE,CAAC;QACpD,aAAa,CAAC,KAAK,GAAG,qBAAqB,CAAC,sBAAsB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QAChF,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,WAAW,EAAE,aAAa,CAAC,CAAC;QACxD,OAAO,aAAa,CAAC,KAAK,CAAC;IAC7B,CAAC,CAAC;IACF,UAAU,CAAC,YAAY,GAAG,IAAI,CAAC;IAC/B,OAAO,UAAU,CAAC,QAAQ,CAAC;IAC3B,OAAO,UAAU,CAAC,KAAK,CAAC;IACxB,OAAO,UAAU,CAAC;AACpB,CAAC"}
@@ -0,0 +1,63 @@
1
+ // TODO: This was written for Jasmine, needs to be updated for Jest
2
+ /*
3
+ * import createRAFStub from "raf-stub";
4
+ * import { lockedToAnimationFrames } from "./locked-to-animation-frames";
5
+ */
6
+ describe("lockedToAnimationFrames", function () {
7
+ /*
8
+ * let rAFStub; let
9
+ * testInstance;
10
+ */
11
+ /*
12
+ * class TestClass {
13
+ * n = 0;
14
+ */
15
+ /*
16
+ * @lockedToAnimationFrames
17
+ * increment() {
18
+ * this.n += 1;
19
+ * }
20
+ * }
21
+ */
22
+ /*
23
+ * beforeEach(() => {
24
+ * testInstance = new TestClass();
25
+ * rAFStub = createRAFStub();
26
+ * spyOn(window, "requestAnimationFrame").and.callFake(rAFStub.add);
27
+ * spyOn(window, "cancelAnimationFrame").and.callFake(rAFStub.remove);
28
+ * });
29
+ */
30
+ test("locks the decorated method to rAF", function () {
31
+ /*
32
+ * testInstance.increment();
33
+ * expect(testInstance.n).toBe(0);
34
+ * rAFStub.step();
35
+ * expect(testInstance.n).toBe(1);
36
+ */
37
+ });
38
+ test("allows the function to run at most once per frame", function () {
39
+ /*
40
+ * testInstance.increment();
41
+ * testInstance.increment();
42
+ * testInstance.increment();
43
+ * testInstance.increment();
44
+ * testInstance.increment();
45
+ * testInstance.increment();
46
+ * testInstance.increment();
47
+ * testInstance.increment();
48
+ */
49
+ /*
50
+ * rAFStub.step();
51
+ * expect(testInstance.n).toBe(1);
52
+ */
53
+ });
54
+ test("is cancelable with reset()", function () {
55
+ /*
56
+ * testInstance.increment();
57
+ * testInstance.increment.reset();
58
+ * rAFStub.step();
59
+ * expect(testInstance.n).toBe(0);
60
+ */
61
+ });
62
+ });
63
+ //# sourceMappingURL=locked-to-animation-frames.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locked-to-animation-frames.spec.js","sourceRoot":"","sources":["../../../src/decorators/locked-to-animation-frames.spec.ts"],"names":[],"mappings":"AAAA,mEAAmE;AAEnE;;;GAGG;AAEH,QAAQ,CAAC,yBAAyB,EAAE;IAClC;;;OAGG;IAEH;;;OAGG;IAEH;;;;;;OAMG;IAEH;;;;;;;OAOG;IAEH,IAAI,CAAC,mCAAmC,EAAE;QACxC;;;;;WAKG;IACL,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,mDAAmD,EAAE;QACxD;;;;;;;;;WASG;QAEH;;;WAGG;IACL,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,4BAA4B,EAAE;QACjC;;;;;WAKG;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -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,80 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __values = (this && this.__values) || function(o) {
13
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
14
+ if (m) return m.call(o);
15
+ if (o && typeof o.length === "number") return {
16
+ next: function () {
17
+ if (o && i >= o.length) o = void 0;
18
+ return { value: o && o[i++], done: !o };
19
+ }
20
+ };
21
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
22
+ };
23
+ /**
24
+ * This would be simpler to understand as a factory that returns a decorator function,
25
+ * but TypeScript AoT compliation doesn't allow that. This lets you create a decorator
26
+ * that takes in a metadata object as an argument and assigns its values along with
27
+ * default values to the decorated method. The decorator will look like a standard
28
+ * decorator but calling this method and returning the result is the only thing it
29
+ * needs to do.
30
+ */
31
+ export function simpleMetadataDecoratorApplicator(metadata, defaults, target, key, descriptor) {
32
+ var updatedDescriptor = descriptor || Object.getOwnPropertyDescriptor(target, key);
33
+ var getter = updatedDescriptor.get;
34
+ var value = updatedDescriptor.value;
35
+ updatedDescriptor.get = function get() {
36
+ var e_1, _a;
37
+ // I don't remember why I did this "this" alias & want to ensure we don't break anything...
38
+ // eslint-disable-next-line @typescript-eslint/no-this-alias
39
+ var self = this;
40
+ var fn = value || getter.call(this);
41
+ var boundFn = fn.bind(this);
42
+ var updatedMetadata = __assign(__assign({}, defaults), metadata);
43
+ var _loop_1 = function (prop) {
44
+ if (typeof metadata[prop] === "function") {
45
+ Object.defineProperty(boundFn, prop, {
46
+ get: function () {
47
+ return updatedMetadata[prop](self);
48
+ },
49
+ });
50
+ }
51
+ else {
52
+ boundFn[prop] = updatedMetadata[prop];
53
+ }
54
+ };
55
+ try {
56
+ for (var _b = __values(Object.keys(defaults)), _c = _b.next(); !_c.done; _c = _b.next()) {
57
+ var prop = _c.value;
58
+ _loop_1(prop);
59
+ }
60
+ }
61
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
62
+ finally {
63
+ try {
64
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
65
+ }
66
+ finally { if (e_1) throw e_1.error; }
67
+ }
68
+ Object.defineProperty(this, key, {
69
+ writable: true,
70
+ configurable: true,
71
+ enumerable: updatedDescriptor.enumerable,
72
+ value: boundFn,
73
+ });
74
+ return boundFn;
75
+ };
76
+ delete updatedDescriptor.value;
77
+ delete updatedDescriptor.writable;
78
+ return updatedDescriptor;
79
+ }
80
+ //# sourceMappingURL=simple-metadata-decorator-applicator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simple-metadata-decorator-applicator.js","sourceRoot":"","sources":["../../../src/decorators/simple-metadata-decorator-applicator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAIA;;;;;;;GAOG;AACH,MAAM,UAAU,iCAAiC,CAC/C,QAAoB,EACpB,QAAW,EACX,MAAW,EACX,GAAgB,EAChB,UAAsC;IAEtC,IAAM,iBAAiB,GAAG,UAAU,IAAI,MAAM,CAAC,wBAAwB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACrF,IAAM,MAAM,GAAG,iBAAiB,CAAC,GAAG,CAAC;IAC7B,IAAA,KAAK,GAAK,iBAAiB,MAAtB,CAAuB;IAEpC,iBAAiB,CAAC,GAAG,GAAG,SAAS,GAAG;;QAClC,2FAA2F;QAC3F,4DAA4D;QAC5D,IAAM,IAAI,GAAG,IAAI,CAAC;QAClB,IAAM,EAAE,GAAG,KAAK,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtC,IAAM,OAAO,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAE9B,IAAM,eAAe,yBAAQ,QAAQ,GAAK,QAAQ,CAAE,CAAC;gCAE1C,IAAI;YACb,IAAI,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,UAAU,EAAE;gBACxC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,IAAI,EAAE;oBACnC,GAAG;wBACD,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;oBACrC,CAAC;iBACF,CAAC,CAAC;aACJ;iBAAM;gBACL,OAAO,CAAC,IAAI,CAAC,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;aACvC;;;YATH,KAAmB,IAAA,KAAA,SAAA,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA,gBAAA;gBAAnC,IAAM,IAAI,WAAA;wBAAJ,IAAI;aAUd;;;;;;;;;QAED,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,EAAE;YAC/B,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,IAAI;YAClB,UAAU,EAAE,iBAAiB,CAAC,UAAU;YACxC,KAAK,EAAE,OAAO;SACf,CAAC,CAAC;QACH,OAAO,OAAO,CAAC;IACjB,CAAC,CAAC;IAEF,OAAO,iBAAiB,CAAC,KAAK,CAAC;IAC/B,OAAO,iBAAiB,CAAC,QAAQ,CAAC;IAElC,OAAO,iBAAiB,CAAC;AAC3B,CAAC"}
@@ -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,31 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ /** Method decorator that configures the method to always run the tick after it's invoked */
13
+ export function tickDelay(target, propertyKey, descriptor) {
14
+ var originalDescriptorCopy = __assign({}, descriptor);
15
+ originalDescriptorCopy.get = function get() {
16
+ /*
17
+ * Make a new copy each time; if you don't then every instance after the first
18
+ * one of the class containing the decorated method will break.
19
+ */
20
+ var newDescriptor = __assign({}, originalDescriptorCopy);
21
+ var boundFn = originalDescriptorCopy.value.bind(this);
22
+ newDescriptor.value = function () { return setTimeout(boundFn, 0); };
23
+ Object.defineProperty(this, propertyKey, newDescriptor);
24
+ return newDescriptor.value;
25
+ };
26
+ originalDescriptorCopy.configurable = true;
27
+ delete originalDescriptorCopy.writable;
28
+ delete originalDescriptorCopy.value;
29
+ return originalDescriptorCopy;
30
+ }
31
+ //# sourceMappingURL=tick-delay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tick-delay.js","sourceRoot":"","sources":["../../../src/decorators/tick-delay.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,4FAA4F;AAC5F,MAAM,UAAU,SAAS,CACvB,MAAW,EACX,WAAmB,EACnB,UAAsC;IAEtC,IAAM,sBAAsB,gBAAoC,UAAU,CAAE,CAAC;IAC7E,sBAAsB,CAAC,GAAG,GAAG,SAAS,GAAG;QACvC;;;WAGG;QACH,IAAM,aAAa,gBAAQ,sBAAsB,CAAE,CAAC;QACpD,IAAM,OAAO,GAAoC,sBAAsB,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzF,aAAa,CAAC,KAAK,GAAG,cAAM,OAAA,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC,EAAtB,CAAsB,CAAC;QACnD,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,WAAW,EAAE,aAAa,CAAC,CAAC;QACxD,OAAO,aAAa,CAAC,KAAK,CAAC;IAC7B,CAAC,CAAC;IACF,sBAAsB,CAAC,YAAY,GAAG,IAAI,CAAC;IAC3C,OAAO,sBAAsB,CAAC,QAAQ,CAAC;IACvC,OAAO,sBAAsB,CAAC,KAAK,CAAC;IACpC,OAAO,sBAAsB,CAAC;AAChC,CAAC"}
@@ -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,102 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ var __generator = (this && this.__generator) || function (thisArg, body) {
11
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
12
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
13
+ function verb(n) { return function (v) { return step([n, v]); }; }
14
+ function step(op) {
15
+ if (f) throw new TypeError("Generator is already executing.");
16
+ while (_) try {
17
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
18
+ if (y = 0, t) op = [op[0] & 2, t.value];
19
+ switch (op[0]) {
20
+ case 0: case 1: t = op; break;
21
+ case 4: _.label++; return { value: op[1], done: false };
22
+ case 5: _.label++; y = op[1]; op = [0]; continue;
23
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
24
+ default:
25
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
26
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
27
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
29
+ if (t[2]) _.ops.pop();
30
+ _.trys.pop(); continue;
31
+ }
32
+ op = body.call(thisArg, _);
33
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
34
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
+ }
36
+ };
37
+ /**
38
+ * If the function is set to be called, cancel the
39
+ * timeout that would call it. Reset id & pending to defaults.
40
+ *
41
+ * @returns - Whether an invocation was actually canceled or not.
42
+ */
43
+ function resetDebouncedFn() {
44
+ this.pending = false;
45
+ if (typeof this.id === "number") {
46
+ clearTimeout(this.id);
47
+ delete this.id;
48
+ return true;
49
+ }
50
+ return false;
51
+ }
52
+ /**
53
+ * Takes in a function and returns a new function that debounces it.
54
+ * The returned function returns an observable that can be subscribed to
55
+ * if you need to have something happen when the debounced function
56
+ * finally gets called and returns a value.
57
+ */
58
+ export function debounce(functionToDebounce, milliseconds, thisArg) {
59
+ var debFn = function debouncedFn() {
60
+ var args = [];
61
+ for (var _i = 0; _i < arguments.length; _i++) {
62
+ args[_i] = arguments[_i];
63
+ }
64
+ return new Promise(function (resolve, reject) {
65
+ debFn.reset();
66
+ debFn.pending = true;
67
+ function executor() {
68
+ var _this = this;
69
+ void (function () { return __awaiter(_this, void 0, void 0, function () {
70
+ var output, err_1;
71
+ return __generator(this, function (_a) {
72
+ switch (_a.label) {
73
+ case 0:
74
+ _a.trys.push([0, 3, 4, 5]);
75
+ output = functionToDebounce.apply(thisArg || this, args);
76
+ if (!(output instanceof Promise)) return [3 /*break*/, 2];
77
+ return [4 /*yield*/, output];
78
+ case 1:
79
+ output = _a.sent();
80
+ _a.label = 2;
81
+ case 2:
82
+ resolve(output);
83
+ return [3 /*break*/, 5];
84
+ case 3:
85
+ err_1 = _a.sent();
86
+ reject(err_1);
87
+ return [3 /*break*/, 5];
88
+ case 4:
89
+ debFn.reset();
90
+ return [7 /*endfinally*/];
91
+ case 5: return [2 /*return*/];
92
+ }
93
+ });
94
+ }); })();
95
+ }
96
+ debFn.id = window.setTimeout(executor, milliseconds);
97
+ });
98
+ };
99
+ debFn.reset = resetDebouncedFn.bind(debFn);
100
+ return debFn;
101
+ }
102
+ //# sourceMappingURL=debounce.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debounce.js","sourceRoot":"","sources":["../../../src/function/debounce.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA;;;;;GAKG;AACH,SAAS,gBAAgB;IACvB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACrB,IAAI,OAAO,IAAI,CAAC,EAAE,KAAK,QAAQ,EAAE;QAC/B,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACtB,OAAO,IAAI,CAAC,EAAE,CAAC;QACf,OAAO,IAAI,CAAC;KACb;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,QAAQ,CACtB,kBAAqD,EACrD,YAAoB,EACpB,OAA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