@spscommerce/utils 5.4.1 → 5.5.0-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 (210) hide show
  1. package/.pnpm-debug.log +20 -0
  2. package/{lib → dist/out-tsc}/array/flatten.d.ts +0 -0
  3. package/dist/out-tsc/array/flatten.js +7 -0
  4. package/dist/out-tsc/array/flatten.js.map +1 -0
  5. package/{lib → dist/out-tsc}/array/flatten.spec.d.ts +0 -0
  6. package/dist/out-tsc/array/flatten.spec.js +10 -0
  7. package/dist/out-tsc/array/flatten.spec.js.map +1 -0
  8. package/{lib → dist/out-tsc}/array/index.d.ts +0 -0
  9. package/dist/out-tsc/array/index.js +4 -0
  10. package/dist/out-tsc/array/index.js.map +1 -0
  11. package/{lib → dist/out-tsc}/array/is-subset.d.ts +0 -0
  12. package/dist/out-tsc/array/is-subset.js +41 -0
  13. package/dist/out-tsc/array/is-subset.js.map +1 -0
  14. package/{lib → dist/out-tsc}/array/is-subset.spec.d.ts +0 -0
  15. package/dist/out-tsc/array/is-subset.spec.js +41 -0
  16. package/dist/out-tsc/array/is-subset.spec.js.map +1 -0
  17. package/{lib → dist/out-tsc}/array/range.d.ts +0 -0
  18. package/dist/out-tsc/array/range.js +16 -0
  19. package/dist/out-tsc/array/range.js.map +1 -0
  20. package/{lib → dist/out-tsc}/array/range.spec.d.ts +0 -0
  21. package/dist/out-tsc/array/range.spec.js +26 -0
  22. package/dist/out-tsc/array/range.spec.js.map +1 -0
  23. package/{lib → dist/out-tsc}/classes/custom-event.d.ts +0 -0
  24. package/dist/out-tsc/classes/custom-event.js +87 -0
  25. package/dist/out-tsc/classes/custom-event.js.map +1 -0
  26. package/{lib → dist/out-tsc}/classes/index.d.ts +0 -0
  27. package/dist/out-tsc/classes/index.js +2 -0
  28. package/dist/out-tsc/classes/index.js.map +1 -0
  29. package/{lib → dist/out-tsc}/data/doctypes.d.ts +0 -0
  30. package/dist/out-tsc/data/doctypes.js +302 -0
  31. package/dist/out-tsc/data/doctypes.js.map +1 -0
  32. package/{lib → dist/out-tsc}/data/index.d.ts +0 -0
  33. package/dist/out-tsc/data/index.js +2 -0
  34. package/dist/out-tsc/data/index.js.map +1 -0
  35. package/{lib → dist/out-tsc}/decorators/cast-to-number.d.ts +0 -0
  36. package/dist/out-tsc/decorators/cast-to-number.js +29 -0
  37. package/dist/out-tsc/decorators/cast-to-number.js.map +1 -0
  38. package/{lib → dist/out-tsc}/decorators/debounced.broken_spec.d.ts +0 -0
  39. package/dist/out-tsc/decorators/debounced.broken_spec.js +38 -0
  40. package/dist/out-tsc/decorators/debounced.broken_spec.js.map +1 -0
  41. package/{lib → dist/out-tsc}/decorators/debounced.d.ts +0 -0
  42. package/dist/out-tsc/decorators/debounced.js +35 -0
  43. package/dist/out-tsc/decorators/debounced.js.map +1 -0
  44. package/{lib → dist/out-tsc}/decorators/index.d.ts +0 -0
  45. package/dist/out-tsc/decorators/index.js +6 -0
  46. package/dist/out-tsc/decorators/index.js.map +1 -0
  47. package/{lib → dist/out-tsc}/decorators/locked-to-animation-frames.d.ts +0 -0
  48. package/dist/out-tsc/decorators/locked-to-animation-frames.js +34 -0
  49. package/dist/out-tsc/decorators/locked-to-animation-frames.js.map +1 -0
  50. package/{lib → dist/out-tsc}/decorators/locked-to-animation-frames.spec.d.ts +0 -0
  51. package/dist/out-tsc/decorators/locked-to-animation-frames.spec.js +63 -0
  52. package/dist/out-tsc/decorators/locked-to-animation-frames.spec.js.map +1 -0
  53. package/{lib → dist/out-tsc}/decorators/simple-metadata-decorator-applicator.d.ts +0 -0
  54. package/dist/out-tsc/decorators/simple-metadata-decorator-applicator.js +80 -0
  55. package/dist/out-tsc/decorators/simple-metadata-decorator-applicator.js.map +1 -0
  56. package/{lib → dist/out-tsc}/decorators/tick-delay.d.ts +0 -0
  57. package/dist/out-tsc/decorators/tick-delay.js +31 -0
  58. package/dist/out-tsc/decorators/tick-delay.js.map +1 -0
  59. package/{lib → dist/out-tsc}/function/debounce.d.ts +0 -0
  60. package/dist/out-tsc/function/debounce.js +102 -0
  61. package/dist/out-tsc/function/debounce.js.map +1 -0
  62. package/{lib → dist/out-tsc}/function/debounce.spec.d.ts +0 -0
  63. package/dist/out-tsc/function/debounce.spec.js +150 -0
  64. package/dist/out-tsc/function/debounce.spec.js.map +1 -0
  65. package/{lib → dist/out-tsc}/function/debounced-function.interface.d.ts +0 -0
  66. package/dist/out-tsc/function/debounced-function.interface.js +2 -0
  67. package/dist/out-tsc/function/debounced-function.interface.js.map +1 -0
  68. package/{lib → dist/out-tsc}/function/delayed-function.interface.d.ts +0 -0
  69. package/dist/out-tsc/function/delayed-function.interface.js +2 -0
  70. package/dist/out-tsc/function/delayed-function.interface.js.map +1 -0
  71. package/{lib → dist/out-tsc}/function/index.d.ts +0 -0
  72. package/dist/out-tsc/function/index.js +7 -0
  73. package/dist/out-tsc/function/index.js.map +1 -0
  74. package/{lib → dist/out-tsc}/function/lock-to-animation-frames.d.ts +0 -0
  75. package/dist/out-tsc/function/lock-to-animation-frames.js +43 -0
  76. package/dist/out-tsc/function/lock-to-animation-frames.js.map +1 -0
  77. package/{lib → dist/out-tsc}/function/lock-to-animation-frames.spec.d.ts +0 -0
  78. package/dist/out-tsc/function/lock-to-animation-frames.spec.js +53 -0
  79. package/dist/out-tsc/function/lock-to-animation-frames.spec.js.map +1 -0
  80. package/{lib → dist/out-tsc}/function/on-next-tick.d.ts +0 -0
  81. package/dist/out-tsc/function/on-next-tick.js +12 -0
  82. package/dist/out-tsc/function/on-next-tick.js.map +1 -0
  83. package/{lib → dist/out-tsc}/function/on-next-tick.spec.d.ts +0 -0
  84. package/dist/out-tsc/function/on-next-tick.spec.js +13 -0
  85. package/dist/out-tsc/function/on-next-tick.spec.js.map +1 -0
  86. package/{lib → dist/out-tsc}/function/op.d.ts +0 -0
  87. package/dist/out-tsc/function/op.js +34 -0
  88. package/dist/out-tsc/function/op.js.map +1 -0
  89. package/{lib → dist/out-tsc}/function/op.spec.d.ts +0 -0
  90. package/dist/out-tsc/function/op.spec.js +94 -0
  91. package/dist/out-tsc/function/op.spec.js.map +1 -0
  92. package/{lib → dist/out-tsc}/index.d.ts +0 -0
  93. package/dist/out-tsc/index.js +10 -0
  94. package/dist/out-tsc/index.js.map +1 -0
  95. package/{lib → dist/out-tsc}/number/constrain.d.ts +0 -0
  96. package/dist/out-tsc/number/constrain.js +16 -0
  97. package/dist/out-tsc/number/constrain.js.map +1 -0
  98. package/{lib → dist/out-tsc}/number/decimal-round.d.ts +0 -0
  99. package/dist/out-tsc/number/decimal-round.js +19 -0
  100. package/dist/out-tsc/number/decimal-round.js.map +1 -0
  101. package/{lib → dist/out-tsc}/number/decimal-round.spec.d.ts +0 -0
  102. package/dist/out-tsc/number/decimal-round.spec.js +10 -0
  103. package/dist/out-tsc/number/decimal-round.spec.js.map +1 -0
  104. package/{lib → dist/out-tsc}/number/index.d.ts +0 -0
  105. package/dist/out-tsc/number/index.js +4 -0
  106. package/dist/out-tsc/number/index.js.map +1 -0
  107. package/{lib → dist/out-tsc}/number/to-file-size-string.d.ts +0 -0
  108. package/dist/out-tsc/number/to-file-size-string.js +24 -0
  109. package/dist/out-tsc/number/to-file-size-string.js.map +1 -0
  110. package/{lib → dist/out-tsc}/object/copy-property.d.ts +0 -0
  111. package/dist/out-tsc/object/copy-property.js +9 -0
  112. package/dist/out-tsc/object/copy-property.js.map +1 -0
  113. package/{lib → dist/out-tsc}/object/copy-property.spec.d.ts +0 -0
  114. package/dist/out-tsc/object/copy-property.spec.js +16 -0
  115. package/dist/out-tsc/object/copy-property.spec.js.map +1 -0
  116. package/{lib → dist/out-tsc}/object/crumble-path.d.ts +0 -0
  117. package/dist/out-tsc/object/crumble-path.js +9 -0
  118. package/dist/out-tsc/object/crumble-path.js.map +1 -0
  119. package/{lib → dist/out-tsc}/object/crumble-path.spec.d.ts +0 -0
  120. package/dist/out-tsc/object/crumble-path.spec.js +24 -0
  121. package/dist/out-tsc/object/crumble-path.spec.js.map +1 -0
  122. package/{lib → dist/out-tsc}/object/deep-freeze.d.ts +0 -0
  123. package/dist/out-tsc/object/deep-freeze.js +36 -0
  124. package/dist/out-tsc/object/deep-freeze.js.map +1 -0
  125. package/{lib → dist/out-tsc}/object/deep-freeze.spec.d.ts +0 -0
  126. package/dist/out-tsc/object/deep-freeze.spec.js +14 -0
  127. package/dist/out-tsc/object/deep-freeze.spec.js.map +1 -0
  128. package/{lib → dist/out-tsc}/object/diff.d.ts +0 -0
  129. package/dist/out-tsc/object/diff.js +92 -0
  130. package/dist/out-tsc/object/diff.js.map +1 -0
  131. package/{lib → dist/out-tsc}/object/diff.spec.d.ts +0 -0
  132. package/dist/out-tsc/object/diff.spec.js +40 -0
  133. package/dist/out-tsc/object/diff.spec.js.map +1 -0
  134. package/{lib → dist/out-tsc}/object/for-each-entry-deep.d.ts +0 -0
  135. package/dist/out-tsc/object/for-each-entry-deep.js +38 -0
  136. package/dist/out-tsc/object/for-each-entry-deep.js.map +1 -0
  137. package/{lib → dist/out-tsc}/object/for-each-entry-deep.spec.d.ts +0 -0
  138. package/dist/out-tsc/object/for-each-entry-deep.spec.js +24 -0
  139. package/dist/out-tsc/object/for-each-entry-deep.spec.js.map +1 -0
  140. package/{lib → dist/out-tsc}/object/for-each-nested-object.d.ts +0 -0
  141. package/dist/out-tsc/object/for-each-nested-object.js +38 -0
  142. package/dist/out-tsc/object/for-each-nested-object.js.map +1 -0
  143. package/{lib → dist/out-tsc}/object/for-each-nested-object.spec.d.ts +0 -0
  144. package/dist/out-tsc/object/for-each-nested-object.spec.js +46 -0
  145. package/dist/out-tsc/object/for-each-nested-object.spec.js.map +1 -0
  146. package/{lib → dist/out-tsc}/object/get-path.d.ts +0 -0
  147. package/dist/out-tsc/object/get-path.js +67 -0
  148. package/dist/out-tsc/object/get-path.js.map +1 -0
  149. package/{lib → dist/out-tsc}/object/get-path.spec.d.ts +0 -0
  150. package/dist/out-tsc/object/get-path.spec.js +44 -0
  151. package/dist/out-tsc/object/get-path.spec.js.map +1 -0
  152. package/{lib → dist/out-tsc}/object/index.d.ts +0 -0
  153. package/dist/out-tsc/object/index.js +14 -0
  154. package/dist/out-tsc/object/index.js.map +1 -0
  155. package/{lib → dist/out-tsc}/object/merge-deep.d.ts +0 -0
  156. package/dist/out-tsc/object/merge-deep.js +60 -0
  157. package/dist/out-tsc/object/merge-deep.js.map +1 -0
  158. package/{lib → dist/out-tsc}/object/merge-deep.spec.d.ts +0 -0
  159. package/dist/out-tsc/object/merge-deep.spec.js +16 -0
  160. package/dist/out-tsc/object/merge-deep.spec.js.map +1 -0
  161. package/{lib → dist/out-tsc}/object/merge-properties-deep.d.ts +0 -0
  162. package/dist/out-tsc/object/merge-properties-deep.js +61 -0
  163. package/dist/out-tsc/object/merge-properties-deep.js.map +1 -0
  164. package/{lib → dist/out-tsc}/object/merge-properties-deep.spec.d.ts +0 -0
  165. package/dist/out-tsc/object/merge-properties-deep.spec.js +24 -0
  166. package/dist/out-tsc/object/merge-properties-deep.spec.js.map +1 -0
  167. package/{lib → dist/out-tsc}/object/omit.d.ts +0 -0
  168. package/dist/out-tsc/object/omit.js +40 -0
  169. package/dist/out-tsc/object/omit.js.map +1 -0
  170. package/{lib → dist/out-tsc}/object/omit.spec.d.ts +0 -0
  171. package/dist/out-tsc/object/omit.spec.js +10 -0
  172. package/dist/out-tsc/object/omit.spec.js.map +1 -0
  173. package/{lib → dist/out-tsc}/object/set-path.d.ts +0 -0
  174. package/dist/out-tsc/object/set-path.js +45 -0
  175. package/dist/out-tsc/object/set-path.js.map +1 -0
  176. package/{lib → dist/out-tsc}/object/set-path.spec.d.ts +0 -0
  177. package/dist/out-tsc/object/set-path.spec.js +36 -0
  178. package/dist/out-tsc/object/set-path.spec.js.map +1 -0
  179. package/{lib → dist/out-tsc}/object/traverse-path.d.ts +0 -0
  180. package/dist/out-tsc/object/traverse-path.js +81 -0
  181. package/dist/out-tsc/object/traverse-path.js.map +1 -0
  182. package/{lib → dist/out-tsc}/object/values.d.ts +0 -0
  183. package/dist/out-tsc/object/values.js +31 -0
  184. package/dist/out-tsc/object/values.js.map +1 -0
  185. package/{lib → dist/out-tsc}/object/values.spec.d.ts +0 -0
  186. package/dist/out-tsc/object/values.spec.js +7 -0
  187. package/dist/out-tsc/object/values.spec.js.map +1 -0
  188. package/{lib → dist/out-tsc}/string/code.template-tag.d.ts +0 -0
  189. package/dist/out-tsc/string/code.template-tag.js +38 -0
  190. package/dist/out-tsc/string/code.template-tag.js.map +1 -0
  191. package/{lib → dist/out-tsc}/string/index.d.ts +0 -0
  192. package/dist/out-tsc/string/index.js +4 -0
  193. package/dist/out-tsc/string/index.js.map +1 -0
  194. package/{lib → dist/out-tsc}/string/parse-file-size.d.ts +0 -0
  195. package/dist/out-tsc/string/parse-file-size.js +43 -0
  196. package/dist/out-tsc/string/parse-file-size.js.map +1 -0
  197. package/{lib → dist/out-tsc}/string/template.d.ts +0 -0
  198. package/dist/out-tsc/string/template.js +28 -0
  199. package/dist/out-tsc/string/template.js.map +1 -0
  200. package/{lib → dist/out-tsc}/string/template.spec.d.ts +0 -0
  201. package/dist/out-tsc/string/template.spec.js +39 -0
  202. package/dist/out-tsc/string/template.spec.js.map +1 -0
  203. package/{lib → dist/out-tsc}/typings.d.ts +0 -0
  204. package/dist/out-tsc/typings.js +2 -0
  205. package/dist/out-tsc/typings.js.map +1 -0
  206. package/package.json +5 -5
  207. package/rollup.config.js +22 -0
  208. package/vite.config.js +1 -1
  209. package/lib/index.cjs.js +0 -1
  210. package/lib/index.es.js +0 -1024
@@ -0,0 +1,150 @@
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
+ var __read = (this && this.__read) || function (o, n) {
38
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
39
+ if (!m) return o;
40
+ var i = m.call(o), r, ar = [], e;
41
+ try {
42
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
43
+ }
44
+ catch (error) { e = { error: error }; }
45
+ finally {
46
+ try {
47
+ if (r && !r.done && (m = i["return"])) m.call(i);
48
+ }
49
+ finally { if (e) throw e.error; }
50
+ }
51
+ return ar;
52
+ };
53
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
54
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
55
+ if (ar || !(i in from)) {
56
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
57
+ ar[i] = from[i];
58
+ }
59
+ }
60
+ return to.concat(ar || Array.prototype.slice.call(from));
61
+ };
62
+ import { debounce } from "./debounce";
63
+ function flushPromises() {
64
+ return new Promise(function (resolve) {
65
+ // eslint-disable-next-line no-undef
66
+ setImmediate(resolve);
67
+ });
68
+ }
69
+ function testDebounce(fn, callback, args, result) {
70
+ return __awaiter(this, void 0, void 0, function () {
71
+ function fnAndCallbackHaveNotBeenCalled() {
72
+ expect(fn).not.toHaveBeenCalled();
73
+ expect(callback).not.toHaveBeenCalled();
74
+ }
75
+ var debounced;
76
+ var _a;
77
+ return __generator(this, function (_b) {
78
+ switch (_b.label) {
79
+ case 0:
80
+ debounced = debounce(fn, 1000);
81
+ void debounced.apply(void 0, __spreadArray([], __read(args), false)).then(callback);
82
+ fnAndCallbackHaveNotBeenCalled();
83
+ jest.advanceTimersByTime(999);
84
+ fnAndCallbackHaveNotBeenCalled();
85
+ void debounced.apply(void 0, __spreadArray([], __read(args), false)).then(callback);
86
+ jest.advanceTimersByTime(1);
87
+ fnAndCallbackHaveNotBeenCalled();
88
+ jest.advanceTimersByTime(998);
89
+ fnAndCallbackHaveNotBeenCalled();
90
+ jest.advanceTimersByTime(1);
91
+ return [4 /*yield*/, flushPromises()];
92
+ case 1:
93
+ _b.sent();
94
+ (_a = expect(fn)).toHaveBeenCalledWith.apply(_a, __spreadArray([], __read(args), false));
95
+ expect(callback).toHaveBeenCalledWith(result);
96
+ return [2 /*return*/];
97
+ }
98
+ });
99
+ });
100
+ }
101
+ describe("debounce", function () {
102
+ beforeEach(function () {
103
+ jest.useFakeTimers();
104
+ });
105
+ afterAll(function () {
106
+ jest.useRealTimers();
107
+ });
108
+ test("returns a new, debounced version of the function", function () { return __awaiter(void 0, void 0, void 0, function () {
109
+ var expectedArguments, fn, callback;
110
+ return __generator(this, function (_a) {
111
+ switch (_a.label) {
112
+ case 0:
113
+ expectedArguments = 2;
114
+ fn = jest.fn(function () { return expectedArguments; });
115
+ callback = jest.fn(function (arg) { return arg; });
116
+ return [4 /*yield*/, testDebounce(fn, callback, [1, "foo"], expectedArguments)];
117
+ case 1:
118
+ _a.sent();
119
+ return [2 /*return*/];
120
+ }
121
+ });
122
+ }); });
123
+ test("works with a function that returns a Promise", function () { return __awaiter(void 0, void 0, void 0, function () {
124
+ var result, fn, callback;
125
+ return __generator(this, function (_a) {
126
+ switch (_a.label) {
127
+ case 0:
128
+ result = 2;
129
+ fn = jest.fn(function () { return Promise.resolve(result); });
130
+ callback = jest.fn(function (arg) { return arg; });
131
+ return [4 /*yield*/, testDebounce(fn, callback, [], 2)];
132
+ case 1:
133
+ _a.sent();
134
+ return [2 /*return*/];
135
+ }
136
+ });
137
+ }); });
138
+ test("is cancelable with reset()", function () {
139
+ var fn = jest.fn(function () { return 2; });
140
+ var callback = jest.fn();
141
+ var debounced = debounce(fn, 1000);
142
+ void debounced().then(callback);
143
+ jest.advanceTimersByTime(999);
144
+ debounced.reset();
145
+ jest.advanceTimersByTime(1);
146
+ expect(fn).not.toHaveBeenCalled();
147
+ expect(callback).not.toHaveBeenCalled();
148
+ });
149
+ });
150
+ //# sourceMappingURL=debounce.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debounce.spec.js","sourceRoot":"","sources":["../../../src/function/debounce.spec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,E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CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAChC,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC;QAC9B,SAAS,CAAC,KAAK,EAAE,CAAC;QAClB,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC;QAC5B,MAAM,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC;QAClC,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC;IAC1C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=debounced-function.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debounced-function.interface.js","sourceRoot":"","sources":["../../../src/function/debounced-function.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=delayed-function.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delayed-function.interface.js","sourceRoot":"","sources":["../../../src/function/delayed-function.interface.ts"],"names":[],"mappings":""}
File without changes
@@ -0,0 +1,7 @@
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";
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/function/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,MAAM,CAAC"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * If the function is set to be called, cancel the
3
+ * timeout that would call it. Reset id & pending to defaults.
4
+ *
5
+ * @returns - Whether an invocation was actually canceled or not.
6
+ */
7
+ function resetLockedFn() {
8
+ this.pending = false;
9
+ if (typeof this.id === "number") {
10
+ window.cancelAnimationFrame(this.id);
11
+ delete this.id;
12
+ return true;
13
+ }
14
+ return false;
15
+ }
16
+ /**
17
+ * Return a new function to replace the passed in one which ensures that
18
+ * the given function will run only in `requestAnimationFrame()` and at
19
+ * most once per frame.
20
+ */
21
+ export function lockToAnimationFrames(functionToLock, thisArg) {
22
+ var lockFn = function lockedFn() {
23
+ var _this = this;
24
+ var args = [];
25
+ for (var _i = 0; _i < arguments.length; _i++) {
26
+ args[_i] = arguments[_i];
27
+ }
28
+ if (lockFn.pending) {
29
+ lockFn.reset();
30
+ }
31
+ lockFn.id = window.requestAnimationFrame(function () {
32
+ if (functionToLock) {
33
+ functionToLock.apply(thisArg || _this, args);
34
+ }
35
+ lockFn.reset();
36
+ });
37
+ lockFn.pending = true;
38
+ };
39
+ lockFn.pending = false;
40
+ lockFn.reset = resetLockedFn.bind(lockFn);
41
+ return lockFn;
42
+ }
43
+ //# sourceMappingURL=lock-to-animation-frames.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lock-to-animation-frames.js","sourceRoot":"","sources":["../../../src/function/lock-to-animation-frames.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,SAAS,aAAa;IACpB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACrB,IAAI,OAAO,IAAI,CAAC,EAAE,KAAK,QAAQ,EAAE;QAC/B,MAAM,CAAC,oBAAoB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACrC,OAAO,IAAI,CAAC,EAAE,CAAC;QACf,OAAO,IAAI,CAAC;KACb;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CACnC,cAAyB,EACzB,OAAa;IAEb,IAAM,MAAM,GAAyB,SAAS,QAAQ;QAAjB,iBAYpC;QAZsD,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,yBAAO;;QAC5D,IAAI,MAAM,CAAC,OAAO,EAAE;YAClB,MAAM,CAAC,KAAK,EAAE,CAAC;SAChB;QACD,MAAM,CAAC,EAAE,GAAG,MAAM,CAAC,qBAAqB,CAAC;YACvC,IAAI,cAAc,EAAE;gBAClB,cAAc,CAAC,KAAK,CAAC,OAAO,IAAI,KAAI,EAAE,IAAI,CAAC,CAAC;aAC7C;YAED,MAAM,CAAC,KAAK,EAAE,CAAC;QACjB,CAAC,CAAC,CAAC;QACH,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC;IACxB,CAAC,CAAC;IAEF,MAAM,CAAC,OAAO,GAAG,KAAK,CAAC;IACvB,MAAM,CAAC,KAAK,GAAG,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAE1C,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,53 @@
1
+ // TODO: This was written for Jasmine, needs to be updated for Jest
2
+ /*
3
+ * import createRAFStub from "raf-stub";
4
+ * import { lockToAnimationFrames } from "./lock-to-animation-frames";
5
+ */
6
+ describe("lockToAnimationFrames", function () {
7
+ /*
8
+ * let rAFStub; let f; let
9
+ * locked;
10
+ */
11
+ beforeEach(function () {
12
+ /*
13
+ * rAFStub = createRAFStub();
14
+ * spyOn(window, "requestAnimationFrame").and.callFake(rAFStub.add);
15
+ * spyOn(window, "cancelAnimationFrame").and.callFake(rAFStub.remove);
16
+ * f = jasmine.createSpy();
17
+ * locked = lockToAnimationFrames(f);
18
+ */
19
+ });
20
+ test("returns a function that runs the passed in function only in RAF", function () {
21
+ /*
22
+ * locked();
23
+ * expect(f).not.toHaveBeenCalled();
24
+ * rAFStub.step();
25
+ * expect(f).toHaveBeenCalled();
26
+ */
27
+ });
28
+ test("allows the function to run at most once per frame", function () {
29
+ /*
30
+ * locked();
31
+ * locked();
32
+ * locked();
33
+ * locked();
34
+ * locked();
35
+ * locked();
36
+ * locked();
37
+ * locked();
38
+ */
39
+ /*
40
+ * rAFStub.step();
41
+ * expect(f).toHaveBeenCalledTimes(1);
42
+ */
43
+ });
44
+ test("is cancelable with reset()", function () {
45
+ /*
46
+ * locked();
47
+ * locked.reset();
48
+ * rAFStub.step();
49
+ * expect(f).not.toHaveBeenCalled();
50
+ */
51
+ });
52
+ });
53
+ //# sourceMappingURL=lock-to-animation-frames.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lock-to-animation-frames.spec.js","sourceRoot":"","sources":["../../../src/function/lock-to-animation-frames.spec.ts"],"names":[],"mappings":"AAAA,mEAAmE;AAEnE;;;GAGG;AAEH,QAAQ,CAAC,uBAAuB,EAAE;IAChC;;;OAGG;IAEH,UAAU,CAAC;QACT;;;;;;WAMG;IACL,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,iEAAiE,EAAE;QACtE;;;;;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"}
File without changes
@@ -0,0 +1,12 @@
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 function onNextTick(fn, thisArg) {
9
+ var boundFn = thisArg ? fn.bind(thisArg) : fn;
10
+ setTimeout(boundFn, 0);
11
+ }
12
+ //# sourceMappingURL=on-next-tick.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"on-next-tick.js","sourceRoot":"","sources":["../../../src/function/on-next-tick.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CAAC,EAAmC,EAAE,OAAa;IAC3E,IAAM,OAAO,GAAoC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACjF,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;AACzB,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { onNextTick } from "./on-next-tick";
2
+ describe("onNextTick", function () {
3
+ test("does a thing?", function (done) {
4
+ var fn = jest.fn();
5
+ onNextTick(fn);
6
+ expect(fn).not.toHaveBeenCalled();
7
+ onNextTick(function () {
8
+ expect(fn).toHaveBeenCalled();
9
+ done();
10
+ });
11
+ });
12
+ });
13
+ //# sourceMappingURL=on-next-tick.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"on-next-tick.spec.js","sourceRoot":"","sources":["../../../src/function/on-next-tick.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,QAAQ,CAAC,YAAY,EAAE;IACrB,IAAI,CAAC,eAAe,EAAE,UAAC,IAAI;QACzB,IAAM,EAAE,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;QACrB,UAAU,CAAC,EAAE,CAAC,CAAC;QACf,MAAM,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC;QAClC,UAAU,CAAC;YACT,MAAM,CAAC,EAAE,CAAC,CAAC,gBAAgB,EAAE,CAAC;YAC9B,IAAI,EAAE,CAAC;QACT,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
File without changes
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Functions for various operators, most useful in combination
3
+ * with functional programming tools like map, filter, and reduce.
4
+ */
5
+ export var Op = {
6
+ // eslint-disable-next-line @typescript-eslint/restrict-plus-operands
7
+ add: function (a, b) { return a + b; },
8
+ and: function (a, b) { return a && b; },
9
+ band: function (a, b) { return a & b; },
10
+ bor: function (a, b) { return a | b; },
11
+ bxor: function (a, b) { return a ^ b; },
12
+ bnot: function (a) { return ~a; },
13
+ decr: function (a) { return a - 1; },
14
+ div: function (a, b) { return a / b; },
15
+ eq: function (a, b) { return a === b; },
16
+ exp: function (a, b) { return Math.pow(a, b); },
17
+ gt: function (a, b) { return a > b; },
18
+ gte: function (a, b) { return a >= b; },
19
+ incr: function (a) { return a + 1; },
20
+ lshift: function (a, b) { return a << b; },
21
+ lt: function (a, b) { return a < b; },
22
+ lte: function (a, b) { return a <= b; },
23
+ mul: function (a, b) { return a * b; },
24
+ neg: function (a) { return -a; },
25
+ neq: function (a, b) { return a !== b; },
26
+ not: function (a) { return !a; },
27
+ or: function (a, b) { return a || b; },
28
+ rem: function (a, b) { return a % b; },
29
+ rshift: function (a, b) { return a >> b; },
30
+ rshift_zf: function (a, b) { return a >>> b; },
31
+ sub: function (a, b) { return a - b; },
32
+ xor: function (a, b) { return (a || b) && !(a && b); },
33
+ };
34
+ //# sourceMappingURL=op.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"op.js","sourceRoot":"","sources":["../../../src/function/op.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,IAAM,EAAE,GAAG;IAChB,qEAAqE;IACrE,GAAG,EAAE,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,GAAG,CAAC,EAAL,CAAK;IAEpB,GAAG,EAAE,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,IAAI,CAAC,EAAN,CAAM;IAErB,IAAI,EAAE,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,GAAG,CAAC,EAAL,CAAK;IAErB,GAAG,EAAE,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,GAAG,CAAC,EAAL,CAAK;IAEpB,IAAI,EAAE,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,GAAG,CAAC,EAAL,CAAK;IAErB,IAAI,EAAE,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,EAAF,CAAE;IAEf,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EAAE,UAAC,CAAS,EAAE,CAAS,IAAK,OAAA,CAAC,GAAG,CAAC,EAAL,CAAK;IAEpC,MAAM,EAAE,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,IAAI,CAAC,EAAN,CAAM;IAExB,SAAS,EAAE,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,KAAK,CAAC,EAAP,CAAO;IAE5B,GAAG,EAAE,UAAC,CAAS,EAAE,CAAS,IAAK,OAAA,CAAC,GAAG,CAAC,EAAL,CAAK;IAEpC,GAAG,EAAE,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,EAArB,CAAqB;CACrC,CAAC"}
File without changes
@@ -0,0 +1,94 @@
1
+ import { Op } from "./op";
2
+ describe("Op", function () {
3
+ test("provides addition as a function", function () {
4
+ expect(Op.add(1, 3)).toBe(4);
5
+ });
6
+ test("provides Boolean AND as a function", function () {
7
+ expect(Op.and(true, true)).toBe(true);
8
+ expect(Op.and(true, false)).toBe(false);
9
+ expect(Op.and(false, true)).toBe(false);
10
+ expect(Op.and(false, false)).toBe(false);
11
+ });
12
+ test("provides bitwise AND as a function", function () {
13
+ expect(Op.band(5, 12)).toBe(4);
14
+ });
15
+ test("provides bitwise OR as a function", function () {
16
+ expect(Op.bor(5, 12)).toBe(13);
17
+ });
18
+ test("provides bitwise XOR as a function", function () {
19
+ expect(Op.bxor(5, 12)).toBe(9);
20
+ });
21
+ test("provides bitwise NOT as a function", function () {
22
+ expect(Op.bnot(5)).toBe(-6);
23
+ });
24
+ test("provides decrement as a function", function () {
25
+ expect(Op.decr(6)).toBe(5);
26
+ });
27
+ test("provides division as a function", function () {
28
+ expect(Op.div(5, 2)).toBe(2.5);
29
+ });
30
+ test("provides equality (triple equals) as a function", function () {
31
+ var a = 5;
32
+ var b = 5;
33
+ var c = "5";
34
+ expect(Op.eq(a, b)).toBe(true);
35
+ expect(Op.eq(b, c)).toBe(false);
36
+ });
37
+ test("provides exponentiation as a function", function () {
38
+ expect(Op.exp(2, 5)).toBe(32);
39
+ });
40
+ test("provides greater-than as a function", function () {
41
+ expect(Op.gt(7, 6)).toBe(true);
42
+ });
43
+ test("provides greater-than-or-equals as a function", function () {
44
+ expect(Op.gte(7, 6)).toBe(true);
45
+ expect(Op.gte(6, 6)).toBe(true);
46
+ });
47
+ test("provides increment as a function", function () {
48
+ expect(Op.incr(4)).toBe(5);
49
+ });
50
+ test("provides left shift as a function", function () {
51
+ expect(Op.lshift(10, 1)).toBe(20);
52
+ expect(Op.lshift(-10, 1)).toBe(-20);
53
+ });
54
+ test("provides less-than as a function", function () {
55
+ expect(Op.lt(6, 7)).toBe(true);
56
+ });
57
+ test("provides less-than-or-equals as a function", function () {
58
+ expect(Op.lte(6, 7)).toBe(true);
59
+ expect(Op.lte(6, 6)).toBe(true);
60
+ });
61
+ test("provides multiplication as a function", function () {
62
+ expect(Op.mul(12, 12)).toBe(144);
63
+ });
64
+ test("provides negation as a function", function () {
65
+ expect(Op.neg(3)).toBe(-3);
66
+ });
67
+ test("provides Boolean OR as a function", function () {
68
+ expect(Op.or(true, true)).toBe(true);
69
+ expect(Op.or(true, false)).toBe(true);
70
+ expect(Op.or(false, true)).toBe(true);
71
+ expect(Op.or(false, false)).toBe(false);
72
+ });
73
+ test("provides remainder as a function", function () {
74
+ expect(Op.rem(17, 7)).toBe(3);
75
+ });
76
+ test("provides right shift as a function", function () {
77
+ expect(Op.rshift(10, 1)).toBe(5);
78
+ expect(Op.rshift(-10, 1)).toBe(-5);
79
+ });
80
+ test("provides unsigned zero-fill right shift as a function", function () {
81
+ expect(Op.rshift_zf(10, 1)).toBe(5);
82
+ expect(Op.rshift_zf(-10, 1)).toBe(2147483643);
83
+ });
84
+ test("provides subtraction as a function", function () {
85
+ expect(Op.sub(9, 4)).toBe(5);
86
+ });
87
+ test("provides Boolean XOR as a function", function () {
88
+ expect(Op.xor(true, true)).toBe(false);
89
+ expect(Op.xor(true, false)).toBe(true);
90
+ expect(Op.xor(false, true)).toBe(true);
91
+ expect(Op.xor(false, false)).toBe(false);
92
+ });
93
+ });
94
+ //# sourceMappingURL=op.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"op.spec.js","sourceRoot":"","sources":["../../../src/function/op.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAE1B,QAAQ,CAAC,IAAI,EAAE;IACb,IAAI,CAAC,iCAAiC,EAAE;QACtC,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;IACH,IAAI,CAAC,oCAAoC,EAAE;QACzC,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtC,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACxC,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACxC,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;IACH,IAAI,CAAC,oCAAoC,EAAE;QACzC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAM,EAAE,EAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAM,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;IACH,IAAI,CAAC,mCAAmC,EAAE;QACxC,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,CAAM,EAAE,EAAM,CAAC,CA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AAE,CAAC,MAAM,CAAC,CAAC,EAAM,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAK,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;IACH,IAAI,CAAC,uDAAuD,EAAE;QAC5D,MAAM,CAAC,EAAE,CAAC,SAAS,CAAC,EAAM,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAK,CAAC,CAAC;QAC5C,MAAM,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,EAAM,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,UAAiC,CAAC,CAAC;IAC3E,CAAC,CAAC,CAAC;IACH,IAAI,CAAC,oCAAoC,EAAE;QACzC,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;IACH,IAAI,CAAC,oCAAoC,EAAE;QACzC,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACvC,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvC,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvC,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
File without changes
@@ -0,0 +1,10 @@
1
+ export * from "./array/index";
2
+ export * from "./classes/index";
3
+ export * from "./data/index";
4
+ export * from "./decorators/index";
5
+ export * from "./function/index";
6
+ export * from "./number/index";
7
+ export * from "./object/index";
8
+ export * from "./string/index";
9
+ export * from "./typings";
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC"}
File without changes
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Constrains a number to the given range. If the number is below the
3
+ * low end of the range, the low end will be returned. If the number is
4
+ * above the top end of the range, the top end will be returned. Otherwise
5
+ * the number itself will be returned.
6
+ */
7
+ export function constrain(n, range) {
8
+ if (!n || n < range[0]) {
9
+ return range[0];
10
+ }
11
+ if (n > range[1]) {
12
+ return range[1];
13
+ }
14
+ return n;
15
+ }
16
+ //# sourceMappingURL=constrain.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constrain.js","sourceRoot":"","sources":["../../../src/number/constrain.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAC,CAAS,EAAE,KAAuB;IAC1D,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE;QACtB,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;KACjB;IACD,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE;QAChB,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;KACjB;IACD,OAAO,CAAC,CAAC;AACX,CAAC"}
File without changes
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Progressively rounds `num` to `decimalPlaces` places. This differs from other
3
+ * rounding methods out there such as lodash's, which are not progressive. For example,
4
+ * `(0.149).toFixed(1)` and lodash `_.round(0.149, 1)` both return `0.1`, but this
5
+ * function rounds `0.149` to `0.15` and then `0.15` to `0.2` and returns `0.2`.
6
+ */
7
+ export function decimalRound(num, decimalPlaces) {
8
+ if (decimalPlaces === void 0) { decimalPlaces = 0; }
9
+ var integralAndFractionalSplit = String(num).split(".");
10
+ var allDecimalPlaces = integralAndFractionalSplit.length > 1
11
+ ? integralAndFractionalSplit[1].length
12
+ : 0;
13
+ var roundedNum = num;
14
+ for (var i = allDecimalPlaces - 1; i >= decimalPlaces; i -= 1) {
15
+ roundedNum = Number("".concat(Math.round(Number("".concat(roundedNum, "e").concat(i))), "e-").concat(i));
16
+ }
17
+ return roundedNum;
18
+ }
19
+ //# sourceMappingURL=decimal-round.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decimal-round.js","sourceRoot":"","sources":["../../../src/number/decimal-round.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,GAAW,EAAE,aAAiB;IAAjB,8BAAA,EAAA,iBAAiB;IACzD,IAAM,0BAA0B,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC1D,IAAM,gBAAgB,GAAG,0BAA0B,CAAC,MAAM,GAAG,CAAC;QAC5D,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,CAAC,MAAM;QACtC,CAAC,CAAC,CAAC,CAAC;IAEN,IAAI,UAAU,GAAG,GAAG,CAAC;IACrB,KAAK,IAAI,CAAC,GAAG,gBAAgB,GAAG,CAAC,EAAE,CAAC,IAAI,aAAa,EAAE,CAAC,IAAI,CAAC,EAAE;QAC7D,UAAU,GAAG,MAAM,CAAC,UAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,UAAG,UAAU,cAAI,CAAC,CAAE,CAAC,CAAC,eAAK,CAAC,CAAE,CAAC,CAAC;KAC1E;IAED,OAAO,UAAU,CAAC;AACpB,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { decimalRound } from "./decimal-round";
2
+ describe("decimalRound", function () {
3
+ test("does decimal rounding", function () {
4
+ expect(decimalRound(1.49)).toEqual(2);
5
+ });
6
+ test("rounds to a given number of places", function () {
7
+ expect(decimalRound(0.0149, 2)).toEqual(0.02);
8
+ });
9
+ });
10
+ //# sourceMappingURL=decimal-round.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decimal-round.spec.js","sourceRoot":"","sources":["../../../src/number/decimal-round.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,QAAQ,CAAC,cAAc,EAAE;IACvB,IAAI,CAAC,uBAAuB,EAAE;QAC5B,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,oCAAoC,EAAE;QACzC,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
File without changes
@@ -0,0 +1,4 @@
1
+ export * from "./constrain";
2
+ export * from "./decimal-round";
3
+ export * from "./to-file-size-string";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/number/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { decimalRound } from "./decimal-round";
2
+ /**
3
+ * Converts a file size in bytes to a human-friendly string. For example,
4
+ * `toFileSizeString(2048)` will return `"2.00KB"`.
5
+ */
6
+ export function toFileSizeString(n, precision) {
7
+ if (precision === void 0) { precision = 2; }
8
+ if (n > Number.MAX_SAFE_INTEGER) {
9
+ throw new Error("Number is greater than MAX_SAFE_INTEGER; "
10
+ + "toFileSizeString does not support orders of magnitude "
11
+ + "higher than petabytes for this reason until BigInt "
12
+ + "achieves broad browser support.");
13
+ }
14
+ var magnitude = Math.min(Math.floor(Math.log(n) / Math.log(1024)), 5);
15
+ var unit = ["B",
16
+ "KB",
17
+ "MB",
18
+ "GB",
19
+ "TB",
20
+ "PB"][magnitude];
21
+ var decimalPlaces = magnitude ? precision : 0;
22
+ return decimalRound(n / (Math.pow(1024, magnitude)), decimalPlaces).toFixed(decimalPlaces) + unit;
23
+ }
24
+ //# sourceMappingURL=to-file-size-string.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"to-file-size-string.js","sourceRoot":"","sources":["../../../src/number/to-file-size-string.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,CAAS,EAAE,SAAa;IAAb,0BAAA,EAAA,aAAa;IACvD,IAAI,CAAC,GAAG,MAAM,CAAC,gBAAgB,EAAE;QAC/B,MAAM,IAAI,KAAK,CACb,2CAA2C;cAC/B,wDAAwD;cACxD,qDAAqD;cACrD,iCAAiC,CAC9C,CAAC;KACH;IACD,IAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACxE,IAAM,IAAI,GAAG,CAAC,GAAG;QACf,IAAI;QACJ,IAAI;QACJ,IAAI;QACJ,IAAI;QACJ,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC;IACnB,IAAM,aAAa,GAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;IAChD,OAAO,YAAY,CAAC,CAAC,GAAG,CAAC,SAAA,IAAI,EAAI,SAAS,CAAA,CAAC,EAAE,aAAa,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC;AAC5F,CAAC"}
File without changes