@spscommerce/utils 5.20.3-ie → 5.20.5

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/lib/index.cjs.js +1 -2437
  2. package/lib/index.es.js +893 -2268
  3. package/package.json +5 -5
  4. package/vite.config.js +1 -1
  5. package/dist/out-tsc/array/flatten.d.ts +0 -1
  6. package/dist/out-tsc/array/flatten.js +0 -7
  7. package/dist/out-tsc/array/flatten.js.map +0 -1
  8. package/dist/out-tsc/array/flatten.spec.d.ts +0 -1
  9. package/dist/out-tsc/array/flatten.spec.js +0 -10
  10. package/dist/out-tsc/array/flatten.spec.js.map +0 -1
  11. package/dist/out-tsc/array/index.d.ts +0 -3
  12. package/dist/out-tsc/array/index.js +0 -4
  13. package/dist/out-tsc/array/index.js.map +0 -1
  14. package/dist/out-tsc/array/is-subset.d.ts +0 -4
  15. package/dist/out-tsc/array/is-subset.js +0 -41
  16. package/dist/out-tsc/array/is-subset.js.map +0 -1
  17. package/dist/out-tsc/array/is-subset.spec.d.ts +0 -1
  18. package/dist/out-tsc/array/is-subset.spec.js +0 -41
  19. package/dist/out-tsc/array/is-subset.spec.js.map +0 -1
  20. package/dist/out-tsc/array/range.d.ts +0 -5
  21. package/dist/out-tsc/array/range.js +0 -16
  22. package/dist/out-tsc/array/range.js.map +0 -1
  23. package/dist/out-tsc/array/range.spec.d.ts +0 -1
  24. package/dist/out-tsc/array/range.spec.js +0 -26
  25. package/dist/out-tsc/array/range.spec.js.map +0 -1
  26. package/dist/out-tsc/classes/custom-event.d.ts +0 -4
  27. package/dist/out-tsc/classes/custom-event.js +0 -87
  28. package/dist/out-tsc/classes/custom-event.js.map +0 -1
  29. package/dist/out-tsc/classes/index.d.ts +0 -1
  30. package/dist/out-tsc/classes/index.js +0 -2
  31. package/dist/out-tsc/classes/index.js.map +0 -1
  32. package/dist/out-tsc/data/doctypes.d.ts +0 -4
  33. package/dist/out-tsc/data/doctypes.js +0 -302
  34. package/dist/out-tsc/data/doctypes.js.map +0 -1
  35. package/dist/out-tsc/data/index.d.ts +0 -1
  36. package/dist/out-tsc/data/index.js +0 -2
  37. package/dist/out-tsc/data/index.js.map +0 -1
  38. package/dist/out-tsc/decorators/cast-to-number.d.ts +0 -5
  39. package/dist/out-tsc/decorators/cast-to-number.js +0 -29
  40. package/dist/out-tsc/decorators/cast-to-number.js.map +0 -1
  41. package/dist/out-tsc/decorators/debounced.broken_spec.d.ts +0 -0
  42. package/dist/out-tsc/decorators/debounced.broken_spec.js +0 -38
  43. package/dist/out-tsc/decorators/debounced.broken_spec.js.map +0 -1
  44. package/dist/out-tsc/decorators/debounced.d.ts +0 -11
  45. package/dist/out-tsc/decorators/debounced.js +0 -35
  46. package/dist/out-tsc/decorators/debounced.js.map +0 -1
  47. package/dist/out-tsc/decorators/index.d.ts +0 -5
  48. package/dist/out-tsc/decorators/index.js +0 -6
  49. package/dist/out-tsc/decorators/index.js.map +0 -1
  50. package/dist/out-tsc/decorators/locked-to-animation-frames.d.ts +0 -4
  51. package/dist/out-tsc/decorators/locked-to-animation-frames.js +0 -34
  52. package/dist/out-tsc/decorators/locked-to-animation-frames.js.map +0 -1
  53. package/dist/out-tsc/decorators/locked-to-animation-frames.spec.d.ts +0 -0
  54. package/dist/out-tsc/decorators/locked-to-animation-frames.spec.js +0 -63
  55. package/dist/out-tsc/decorators/locked-to-animation-frames.spec.js.map +0 -1
  56. package/dist/out-tsc/decorators/simple-metadata-decorator-applicator.d.ts +0 -11
  57. package/dist/out-tsc/decorators/simple-metadata-decorator-applicator.js +0 -80
  58. package/dist/out-tsc/decorators/simple-metadata-decorator-applicator.js.map +0 -1
  59. package/dist/out-tsc/decorators/tick-delay.d.ts +0 -6
  60. package/dist/out-tsc/decorators/tick-delay.js +0 -31
  61. package/dist/out-tsc/decorators/tick-delay.js.map +0 -1
  62. package/dist/out-tsc/function/debounce.d.ts +0 -9
  63. package/dist/out-tsc/function/debounce.js +0 -102
  64. package/dist/out-tsc/function/debounce.js.map +0 -1
  65. package/dist/out-tsc/function/debounce.spec.d.ts +0 -1
  66. package/dist/out-tsc/function/debounce.spec.js +0 -150
  67. package/dist/out-tsc/function/debounce.spec.js.map +0 -1
  68. package/dist/out-tsc/function/debounced-function.interface.d.ts +0 -10
  69. package/dist/out-tsc/function/debounced-function.interface.js +0 -2
  70. package/dist/out-tsc/function/debounced-function.interface.js.map +0 -1
  71. package/dist/out-tsc/function/delayed-function.interface.d.ts +0 -10
  72. package/dist/out-tsc/function/delayed-function.interface.js +0 -2
  73. package/dist/out-tsc/function/delayed-function.interface.js.map +0 -1
  74. package/dist/out-tsc/function/index.d.ts +0 -6
  75. package/dist/out-tsc/function/index.js +0 -7
  76. package/dist/out-tsc/function/index.js.map +0 -1
  77. package/dist/out-tsc/function/lock-to-animation-frames.d.ts +0 -7
  78. package/dist/out-tsc/function/lock-to-animation-frames.js +0 -43
  79. package/dist/out-tsc/function/lock-to-animation-frames.js.map +0 -1
  80. package/dist/out-tsc/function/lock-to-animation-frames.spec.d.ts +0 -0
  81. package/dist/out-tsc/function/lock-to-animation-frames.spec.js +0 -53
  82. package/dist/out-tsc/function/lock-to-animation-frames.spec.js.map +0 -1
  83. package/dist/out-tsc/function/on-next-tick.d.ts +0 -8
  84. package/dist/out-tsc/function/on-next-tick.js +0 -12
  85. package/dist/out-tsc/function/on-next-tick.js.map +0 -1
  86. package/dist/out-tsc/function/on-next-tick.spec.d.ts +0 -1
  87. package/dist/out-tsc/function/on-next-tick.spec.js +0 -13
  88. package/dist/out-tsc/function/on-next-tick.spec.js.map +0 -1
  89. package/dist/out-tsc/function/op.d.ts +0 -32
  90. package/dist/out-tsc/function/op.js +0 -34
  91. package/dist/out-tsc/function/op.js.map +0 -1
  92. package/dist/out-tsc/function/op.spec.d.ts +0 -1
  93. package/dist/out-tsc/function/op.spec.js +0 -94
  94. package/dist/out-tsc/function/op.spec.js.map +0 -1
  95. package/dist/out-tsc/index.d.ts +0 -9
  96. package/dist/out-tsc/index.js +0 -10
  97. package/dist/out-tsc/index.js.map +0 -1
  98. package/dist/out-tsc/number/constrain.d.ts +0 -7
  99. package/dist/out-tsc/number/constrain.js +0 -16
  100. package/dist/out-tsc/number/constrain.js.map +0 -1
  101. package/dist/out-tsc/number/decimal-round.d.ts +0 -7
  102. package/dist/out-tsc/number/decimal-round.js +0 -19
  103. package/dist/out-tsc/number/decimal-round.js.map +0 -1
  104. package/dist/out-tsc/number/decimal-round.spec.d.ts +0 -1
  105. package/dist/out-tsc/number/decimal-round.spec.js +0 -10
  106. package/dist/out-tsc/number/decimal-round.spec.js.map +0 -1
  107. package/dist/out-tsc/number/index.d.ts +0 -3
  108. package/dist/out-tsc/number/index.js +0 -4
  109. package/dist/out-tsc/number/index.js.map +0 -1
  110. package/dist/out-tsc/number/to-file-size-string.d.ts +0 -5
  111. package/dist/out-tsc/number/to-file-size-string.js +0 -24
  112. package/dist/out-tsc/number/to-file-size-string.js.map +0 -1
  113. package/dist/out-tsc/object/copy-property.d.ts +0 -6
  114. package/dist/out-tsc/object/copy-property.js +0 -9
  115. package/dist/out-tsc/object/copy-property.js.map +0 -1
  116. package/dist/out-tsc/object/copy-property.spec.d.ts +0 -1
  117. package/dist/out-tsc/object/copy-property.spec.js +0 -16
  118. package/dist/out-tsc/object/copy-property.spec.js.map +0 -1
  119. package/dist/out-tsc/object/crumble-path.d.ts +0 -6
  120. package/dist/out-tsc/object/crumble-path.js +0 -9
  121. package/dist/out-tsc/object/crumble-path.js.map +0 -1
  122. package/dist/out-tsc/object/crumble-path.spec.d.ts +0 -1
  123. package/dist/out-tsc/object/crumble-path.spec.js +0 -24
  124. package/dist/out-tsc/object/crumble-path.spec.js.map +0 -1
  125. package/dist/out-tsc/object/deep-freeze.d.ts +0 -1
  126. package/dist/out-tsc/object/deep-freeze.js +0 -36
  127. package/dist/out-tsc/object/deep-freeze.js.map +0 -1
  128. package/dist/out-tsc/object/deep-freeze.spec.d.ts +0 -1
  129. package/dist/out-tsc/object/deep-freeze.spec.js +0 -14
  130. package/dist/out-tsc/object/deep-freeze.spec.js.map +0 -1
  131. package/dist/out-tsc/object/diff.d.ts +0 -12
  132. package/dist/out-tsc/object/diff.js +0 -92
  133. package/dist/out-tsc/object/diff.js.map +0 -1
  134. package/dist/out-tsc/object/diff.spec.d.ts +0 -1
  135. package/dist/out-tsc/object/diff.spec.js +0 -40
  136. package/dist/out-tsc/object/diff.spec.js.map +0 -1
  137. package/dist/out-tsc/object/for-each-entry-deep.d.ts +0 -4
  138. package/dist/out-tsc/object/for-each-entry-deep.js +0 -38
  139. package/dist/out-tsc/object/for-each-entry-deep.js.map +0 -1
  140. package/dist/out-tsc/object/for-each-entry-deep.spec.d.ts +0 -1
  141. package/dist/out-tsc/object/for-each-entry-deep.spec.js +0 -24
  142. package/dist/out-tsc/object/for-each-entry-deep.spec.js.map +0 -1
  143. package/dist/out-tsc/object/for-each-nested-object.d.ts +0 -4
  144. package/dist/out-tsc/object/for-each-nested-object.js +0 -38
  145. package/dist/out-tsc/object/for-each-nested-object.js.map +0 -1
  146. package/dist/out-tsc/object/for-each-nested-object.spec.d.ts +0 -1
  147. package/dist/out-tsc/object/for-each-nested-object.spec.js +0 -46
  148. package/dist/out-tsc/object/for-each-nested-object.spec.js.map +0 -1
  149. package/dist/out-tsc/object/get-path.d.ts +0 -5
  150. package/dist/out-tsc/object/get-path.js +0 -67
  151. package/dist/out-tsc/object/get-path.js.map +0 -1
  152. package/dist/out-tsc/object/get-path.spec.d.ts +0 -1
  153. package/dist/out-tsc/object/get-path.spec.js +0 -44
  154. package/dist/out-tsc/object/get-path.spec.js.map +0 -1
  155. package/dist/out-tsc/object/index.d.ts +0 -13
  156. package/dist/out-tsc/object/index.js +0 -14
  157. package/dist/out-tsc/object/index.js.map +0 -1
  158. package/dist/out-tsc/object/merge-deep.d.ts +0 -4
  159. package/dist/out-tsc/object/merge-deep.js +0 -60
  160. package/dist/out-tsc/object/merge-deep.js.map +0 -1
  161. package/dist/out-tsc/object/merge-deep.spec.d.ts +0 -1
  162. package/dist/out-tsc/object/merge-deep.spec.js +0 -16
  163. package/dist/out-tsc/object/merge-deep.spec.js.map +0 -1
  164. package/dist/out-tsc/object/merge-properties-deep.d.ts +0 -4
  165. package/dist/out-tsc/object/merge-properties-deep.js +0 -61
  166. package/dist/out-tsc/object/merge-properties-deep.js.map +0 -1
  167. package/dist/out-tsc/object/merge-properties-deep.spec.d.ts +0 -1
  168. package/dist/out-tsc/object/merge-properties-deep.spec.js +0 -24
  169. package/dist/out-tsc/object/merge-properties-deep.spec.js.map +0 -1
  170. package/dist/out-tsc/object/omit.d.ts +0 -1
  171. package/dist/out-tsc/object/omit.js +0 -40
  172. package/dist/out-tsc/object/omit.js.map +0 -1
  173. package/dist/out-tsc/object/omit.spec.d.ts +0 -1
  174. package/dist/out-tsc/object/omit.spec.js +0 -10
  175. package/dist/out-tsc/object/omit.spec.js.map +0 -1
  176. package/dist/out-tsc/object/set-path.d.ts +0 -2
  177. package/dist/out-tsc/object/set-path.js +0 -45
  178. package/dist/out-tsc/object/set-path.js.map +0 -1
  179. package/dist/out-tsc/object/set-path.spec.d.ts +0 -1
  180. package/dist/out-tsc/object/set-path.spec.js +0 -36
  181. package/dist/out-tsc/object/set-path.spec.js.map +0 -1
  182. package/dist/out-tsc/object/traverse-path.d.ts +0 -2
  183. package/dist/out-tsc/object/traverse-path.js +0 -81
  184. package/dist/out-tsc/object/traverse-path.js.map +0 -1
  185. package/dist/out-tsc/object/values.d.ts +0 -2
  186. package/dist/out-tsc/object/values.js +0 -31
  187. package/dist/out-tsc/object/values.js.map +0 -1
  188. package/dist/out-tsc/object/values.spec.d.ts +0 -1
  189. package/dist/out-tsc/object/values.spec.js +0 -7
  190. package/dist/out-tsc/object/values.spec.js.map +0 -1
  191. package/dist/out-tsc/string/code.template-tag.d.ts +0 -2
  192. package/dist/out-tsc/string/code.template-tag.js +0 -38
  193. package/dist/out-tsc/string/code.template-tag.js.map +0 -1
  194. package/dist/out-tsc/string/index.d.ts +0 -3
  195. package/dist/out-tsc/string/index.js +0 -4
  196. package/dist/out-tsc/string/index.js.map +0 -1
  197. package/dist/out-tsc/string/parse-file-size.d.ts +0 -5
  198. package/dist/out-tsc/string/parse-file-size.js +0 -43
  199. package/dist/out-tsc/string/parse-file-size.js.map +0 -1
  200. package/dist/out-tsc/string/template.d.ts +0 -15
  201. package/dist/out-tsc/string/template.js +0 -28
  202. package/dist/out-tsc/string/template.js.map +0 -1
  203. package/dist/out-tsc/string/template.spec.d.ts +0 -1
  204. package/dist/out-tsc/string/template.spec.js +0 -39
  205. package/dist/out-tsc/string/template.spec.js.map +0 -1
  206. package/dist/out-tsc/typings.d.ts +0 -1
  207. package/dist/out-tsc/typings.js +0 -2
  208. package/dist/out-tsc/typings.js.map +0 -1
  209. package/rollup.config.js +0 -22
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@spscommerce/utils",
3
3
  "description": "Utility items for frontend projects.",
4
- "version": "5.20.3-ie",
4
+ "version": "5.20.5",
5
5
  "author": "SPS Commerce",
6
6
  "license": "UNLICENSED",
7
7
  "repository": "https://github.com/spscommerce/design-system/tree/main/packages/@spscommerce/utils",
@@ -22,12 +22,12 @@
22
22
  "lodash.padstart": "^4.6.1"
23
23
  },
24
24
  "scripts": {
25
- "build": "pnpm run build:es5 && pnpm run build:js && pnpm run build:types",
26
- "build:es5": "tsc -p tsconfig.json",
27
- "build:js": "rollup -c rollup.config.js",
25
+ "build": "pnpm run build:js && pnpm run build:types",
26
+ "build:js": "vite build",
28
27
  "build:types": "tsc --emitDeclarationOnly --declaration --declarationDir lib",
29
28
  "watch": "vite build --watch",
30
29
  "clean": "git clean -fdX",
31
30
  "pub": "pnpm pack && node ../../scripts/publish-package.js"
32
- }
31
+ },
32
+ "readme": "[//]: # \"START_AUTOGENERATED\"\n\n## [@spscommerce/utils](https://github.com/spscommerce/design-system/tree/main/packages/@spscommerce/utils#readme)\n\n![release: 1.1.0](https://img.shields.io/badge/release-1.1.0-blue.svg?style=flat-square)\n![build: passing](https://img.shields.io/badge/build-passing-green.svg?style=flat-square)\n![tests: failing](https://img.shields.io/badge/tests-failing-red.svg?style=flat-square)\n\nUtility items for frontend projects. \n \n ### Installation \n \n ```shell\nnpm install --save @spscommerce/utils\n```\n\n#### Peer Dependencies\n\n<div class=\"row\">\n <div class=\"col-5\"> \n <table class=\"sps-table\">\n <thead class=\"sps-table__head\">\n <tr class=\"sps-table__row\">\n <th class=\"sps-table__header\">\n <span class=\"sps-table__header-cell-body\"> \n Package\n </span>\n </th>\n <th class=\"sps-table__header text-right\">\n <span class=\"sps-table__header-cell-body\"> \n Version\n </span>\n </th>\n </tr>\n </thead>\n <tbody class=\"sps-table__body\">\n <tr class=\"sps-table__row\"><td class=\"sps-table__cell\"><a href=\"https://lodash.com/\">lodash.isempty</a></td><td class=\"sps-table__cell text-right\">^4.4.0</td></tr>\n<tr class=\"sps-table__row\"><td class=\"sps-table__cell\"><a href=\"https://lodash.com/\">lodash.isnil</a></td><td class=\"sps-table__cell text-right\">^4.0.0</td></tr>\n<tr class=\"sps-table__row\"><td class=\"sps-table__cell\"><a href=\"https://lodash.com/\">lodash.isplainobject</a></td><td class=\"sps-table__cell text-right\">^4.0.6</td></tr>\n<tr class=\"sps-table__row\"><td class=\"sps-table__cell\"><a href=\"https://lodash.com/\">lodash.padstart</a></td><td class=\"sps-table__cell text-right\">^4.6.1</td></tr>\n </tbody>\n </table>\n </div>\n <div class=\"col-7\">\n &nbsp;\n </div>\n</div>\n\n[//]: # \"END_AUTOGENERATED\"\n"
33
33
  }
package/vite.config.js CHANGED
@@ -7,7 +7,7 @@ import pkg from './package.json';
7
7
  export default defineConfig({
8
8
  build: {
9
9
  lib: {
10
- entry: path.resolve(__dirname, 'dist/out-tsc/index.js'),
10
+ entry: path.resolve(__dirname, 'src/index.ts'),
11
11
  formats: ['es', 'cjs'],
12
12
  fileName: (format) => `index.${format}.js`,
13
13
  },
@@ -1 +0,0 @@
1
- export declare function flatten(arg: any): any;
@@ -1,7 +0,0 @@
1
- export function flatten(arg) {
2
- if (!Array.isArray(arg)) {
3
- return arg;
4
- }
5
- return arg.reduce(function (acc, x) { return acc.concat(flatten(x)); }, []);
6
- }
7
- //# sourceMappingURL=flatten.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flatten.js","sourceRoot":"","sources":["../../../src/array/flatten.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,OAAO,CAAC,GAAQ;IAC9B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;QACvB,OAAO,GAAG,CAAC;KACZ;IACD,OAAO,GAAG,CAAC,MAAM,CAAC,UAAC,GAAG,EAAE,CAAC,IAAK,OAAA,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAtB,CAAsB,EAAE,EAAE,CAAC,CAAC;AAC5D,CAAC"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,10 +0,0 @@
1
- import { flatten } from "./flatten";
2
- describe("flatten", function () {
3
- test("flattens nested arrays", function () {
4
- expect(flatten([0, [1, [2, 3]]])).toEqual([0,
5
- 1,
6
- 2,
7
- 3]);
8
- });
9
- });
10
- //# sourceMappingURL=flatten.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flatten.spec.js","sourceRoot":"","sources":["../../../src/array/flatten.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,QAAQ,CAAC,SAAS,EAAE;IAClB,IAAI,CAAC,wBAAwB,EAAE;QAC7B,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YAC1C,CAAC;YACD,CAAC;YACD,CAAC,CAAC,CAAC,CAAC;IACR,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,3 +0,0 @@
1
- export * from "./flatten";
2
- export * from "./is-subset";
3
- export * from "./range";
@@ -1,4 +0,0 @@
1
- export * from "./flatten";
2
- export * from "./is-subset";
3
- export * from "./range";
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/array/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
@@ -1,4 +0,0 @@
1
- /**
2
- * Tests if candidate is a subset of array
3
- */
4
- export declare function isSubset(candidate: any[], array: any[]): boolean;
@@ -1,41 +0,0 @@
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
- /**
13
- * Tests if candidate is a subset of array
14
- */
15
- export function isSubset(candidate, array) {
16
- var e_1, _a;
17
- /*
18
- * Set.prototype.has is required by the ECMAScript spec to be
19
- * implemented in sub-linear time, so by converting array to Set
20
- * we can avoid n^2 complexity. (In WebKit, Sets are HashMaps
21
- * internally, so has() is constant time)
22
- */
23
- var set = new Set(array);
24
- try {
25
- for (var candidate_1 = __values(candidate), candidate_1_1 = candidate_1.next(); !candidate_1_1.done; candidate_1_1 = candidate_1.next()) {
26
- var member = candidate_1_1.value;
27
- if (!set.has(member)) {
28
- return false;
29
- }
30
- }
31
- }
32
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
33
- finally {
34
- try {
35
- if (candidate_1_1 && !candidate_1_1.done && (_a = candidate_1.return)) _a.call(candidate_1);
36
- }
37
- finally { if (e_1) throw e_1.error; }
38
- }
39
- return true;
40
- }
41
- //# sourceMappingURL=is-subset.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"is-subset.js","sourceRoot":"","sources":["../../../src/array/is-subset.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA;;GAEG;AACH,MAAM,UAAU,QAAQ,CAAC,SAAgB,EAAE,KAAY;;IACrD;;;;;OAKG;IACH,IAAM,GAAG,GAAG,IAAI,GAAG,CAAM,KAAK,CAAC,CAAC;;QAChC,KAAqB,IAAA,cAAA,SAAA,SAAS,CAAA,oCAAA,2DAAE;YAA3B,IAAM,MAAM,sBAAA;YACf,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE;gBACpB,OAAO,KAAK,CAAC;aACd;SACF;;;;;;;;;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,41 +0,0 @@
1
- import { isSubset } from "./is-subset";
2
- describe("isSubset", function () {
3
- test("returns true when candidate is a subset of array", function () {
4
- expect(isSubset([1,
5
- 3,
6
- 5], [1,
7
- 2,
8
- 3,
9
- 4,
10
- 5])).toBe(true);
11
- });
12
- test("returns false when candidate is not a subset of array", function () {
13
- expect(isSubset([1,
14
- 3,
15
- 5,
16
- 7], [1,
17
- 2,
18
- 3,
19
- 4,
20
- 5])).toBe(false);
21
- });
22
- test("knows the empty set is always a subset", function () {
23
- expect(isSubset([], [1,
24
- 2,
25
- 3,
26
- 4,
27
- 5])).toBe(true);
28
- });
29
- test("knows that a set is a subset of itself", function () {
30
- expect(isSubset([1,
31
- 2,
32
- 3,
33
- 4,
34
- 5], [1,
35
- 2,
36
- 3,
37
- 4,
38
- 5])).toBe(true);
39
- });
40
- });
41
- //# sourceMappingURL=is-subset.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"is-subset.spec.js","sourceRoot":"","sources":["../../../src/array/is-subset.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,QAAQ,CAAC,UAAU,EAAE;IACnB,IAAI,CAAC,kDAAkD,EAAE;QACvD,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;YAChB,CAAC;YACD,CAAC,CAAC,EAAE,CAAC,CAAC;YACN,CAAC;YACD,CAAC;YACD,CAAC;YACD,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,uDAAuD,EAAE;QAC5D,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;YAChB,CAAC;YACD,CAAC;YACD,CAAC,CAAC,EAAE,CAAC,CAAC;YACN,CAAC;YACD,CAAC;YACD,CAAC;YACD,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,wCAAwC,EAAE;QAC7C,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC;YACpB,CAAC;YACD,CAAC;YACD,CAAC;YACD,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,wCAAwC,EAAE;QAC7C,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;YAChB,CAAC;YACD,CAAC;YACD,CAAC;YACD,CAAC,CAAC,EAAE,CAAC,CAAC;YACN,CAAC;YACD,CAAC;YACD,CAAC;YACD,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,5 +0,0 @@
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[];
@@ -1,16 +0,0 @@
1
- import { Op } from "../function";
2
- /**
3
- * Unlike lodash range, includes the specified end number.
4
- * So range(1, 10) gives you 1-10 instead of 1-9.
5
- */
6
- export function range(start, end) {
7
- if (!Number.isInteger(start)) {
8
- throw new Error("start must be an integer");
9
- }
10
- if (!Number.isInteger(end)) {
11
- throw new Error("end must be an integer");
12
- }
13
- return new Array(Math.abs(end - start) + 1).fill(start)
14
- .map(start > end ? Op.sub : Op.add);
15
- }
16
- //# sourceMappingURL=range.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"range.js","sourceRoot":"","sources":["../../../src/array/range.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAEjC;;;GAGG;AACH,MAAM,UAAU,KAAK,CAAC,KAAa,EAAE,GAAW;IAC9C,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE;QAC5B,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;KAC7C;IACD,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE;QAC1B,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;KAC3C;IAED,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;SACpD,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AACxC,CAAC"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,26 +0,0 @@
1
- import { range } from "./range";
2
- describe("range", function () {
3
- test("returns an array of integers ranging from a to b", function () {
4
- expect(range(11, 17)).toEqual([11,
5
- 12,
6
- 13,
7
- 14,
8
- 15,
9
- 16,
10
- 17]);
11
- });
12
- test("works (with digits in descending order) if a is greater than b", function () {
13
- expect(range(17, 11)).toEqual([17,
14
- 16,
15
- 15,
16
- 14,
17
- 13,
18
- 12,
19
- 11]);
20
- });
21
- test("throws if either a or b is not an integer", function () {
22
- expect(function () { return range(Math.PI, 5); }).toThrow();
23
- expect(function () { return range(5, Math.PI); }).toThrow();
24
- });
25
- });
26
- //# sourceMappingURL=range.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"range.spec.js","sourceRoot":"","sources":["../../../src/array/range.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,QAAQ,CAAC,OAAO,EAAE;IAChB,IAAI,CAAC,kDAAkD,EAAE;QACvD,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE;YAC/B,EAAE;YACF,EAAE;YACF,EAAE;YACF,EAAE;YACF,EAAE;YACF,EAAE,CAAC,CAAC,CAAC;IACT,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,gEAAgE,EAAE;QACrE,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE;YAC/B,EAAE;YACF,EAAE;YACF,EAAE;YACF,EAAE;YACF,EAAE;YACF,EAAE,CAAC,CAAC,CAAC;IACT,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,2CAA2C,EAAE;QAChD,MAAM,CAAC,cAAM,OAAA,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,EAAjB,CAAiB,CAAC,CAAC,OAAO,EAAE,CAAC;QAC1C,MAAM,CAAC,cAAM,OAAA,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,EAAjB,CAAiB,CAAC,CAAC,OAAO,EAAE,CAAC;IAC5C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,4 +0,0 @@
1
- /** docs:ignore */
2
- export declare class CustomEvent {
3
- constructor(eventName: string, initDict?: EventInit);
4
- }
@@ -1,87 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-redeclare, @typescript-eslint/no-extraneous-class */
2
- /** docs:ignore */
3
- var __values = (this && this.__values) || function(o) {
4
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
5
- if (m) return m.call(o);
6
- if (o && typeof o.length === "number") return {
7
- next: function () {
8
- if (o && i >= o.length) o = void 0;
9
- return { value: o && o[i++], done: !o };
10
- }
11
- };
12
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
13
- };
14
- /*
15
- * This was intended to be a replacement for Event that allows subclassing
16
- * However it doesn't work in all browsers
17
- * TODO: Drop this, use built-in CustomEvent once IE11 is dead
18
- */
19
- var CustomEvent = /** @class */ (function () {
20
- function CustomEvent(eventName, initDict) {
21
- var e_1, _a, e_2, _b, e_3, _c;
22
- if (initDict === void 0) { initDict = {}; }
23
- var event;
24
- if (typeof Event === "function") {
25
- event = new Event(eventName, initDict);
26
- }
27
- else {
28
- // IE11
29
- event = document.createEvent("Event");
30
- event.initEvent(eventName, initDict.bubbles, initDict.cancelable);
31
- try {
32
- for (var _d = __values(Object.keys(initDict)), _e = _d.next(); !_e.done; _e = _d.next()) {
33
- var key = _e.value;
34
- if (key !== "bubbles" && key !== "cancelable") {
35
- event[key] = initDict[key];
36
- }
37
- }
38
- }
39
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
40
- finally {
41
- try {
42
- if (_e && !_e.done && (_a = _d.return)) _a.call(_d);
43
- }
44
- finally { if (e_1) throw e_1.error; }
45
- }
46
- }
47
- Object.setPrototypeOf(this, event);
48
- /*
49
- * Native functions like the getters, setters, and methods on Event.prototype
50
- * cannot be called with "this" being a custom object. So what we're doing here
51
- * works around that.
52
- */
53
- var descriptors = Object.getOwnPropertyDescriptors(Event.prototype);
54
- try {
55
- for (var _f = __values(Object.keys(descriptors)), _g = _f.next(); !_g.done; _g = _f.next()) {
56
- var propKey = _g.value;
57
- var descriptor = descriptors[propKey];
58
- try {
59
- for (var _h = (e_3 = void 0, __values(Object.keys(descriptor))), _j = _h.next(); !_j.done; _j = _h.next()) {
60
- var key = _j.value;
61
- if (typeof descriptor[key] === "function") {
62
- descriptor[key] = descriptor[key].bind(event);
63
- }
64
- }
65
- }
66
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
67
- finally {
68
- try {
69
- if (_j && !_j.done && (_c = _h.return)) _c.call(_h);
70
- }
71
- finally { if (e_3) throw e_3.error; }
72
- }
73
- }
74
- }
75
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
76
- finally {
77
- try {
78
- if (_g && !_g.done && (_b = _f.return)) _b.call(_f);
79
- }
80
- finally { if (e_2) throw e_2.error; }
81
- }
82
- Object.defineProperties(this, descriptors);
83
- }
84
- return CustomEvent;
85
- }());
86
- export { CustomEvent };
87
- //# sourceMappingURL=custom-event.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"custom-event.js","sourceRoot":"","sources":["../../../src/classes/custom-event.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,kBAAkB;;;;;;;;;;;;AAElB;;;;GAIG;AACH;IACE,qBAAY,SAAiB,EAAE,QAAwB;;QAAxB,yBAAA,EAAA,aAAwB;QACrD,IAAI,KAAK,CAAC;QACV,IAAI,OAAO,KAAK,KAAK,UAAU,EAAE;YAC/B,KAAK,GAAG,IAAI,KAAK,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;SACxC;aAAM;YACL,OAAO;YACP,KAAK,GAAG,QAAQ,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;YACtC,KAAK,CAAC,SAAS,CAAC,SAAS,EAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC;;gBAClE,KAAkB,IAAA,KAAA,SAAA,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA,gBAAA,4BAAE;oBAApC,IAAM,GAAG,WAAA;oBACZ,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,YAAY,EAAE;wBAC7C,KAAK,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;qBAC5B;iBACF;;;;;;;;;SACF;QAED,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAEnC;;;;WAIG;QACH,IAAM,WAAW,GAAG,MAAM,CAAC,yBAAyB,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;;YACtE,KAAsB,IAAA,KAAA,SAAA,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA,gBAAA,4BAAE;gBAA3C,IAAM,OAAO,WAAA;gBAChB,IAAM,UAAU,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;;oBACxC,KAAkB,IAAA,oBAAA,SAAA,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA,CAAA,gBAAA,4BAAE;wBAAtC,IAAM,GAAG,WAAA;wBACZ,IAAI,OAAO,UAAU,CAAC,GAAG,CAAC,KAAK,UAAU,EAAE;4BACzC,UAAU,CAAC,GAAG,CAAC,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;yBAC/C;qBACF;;;;;;;;;aACF;;;;;;;;;QACD,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IAC7C,CAAC;IACH,kBAAC;AAAD,CAAC,AAlCD,IAkCC"}
@@ -1 +0,0 @@
1
- export * from "./custom-event";
@@ -1,2 +0,0 @@
1
- export * from "./custom-event";
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/classes/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
@@ -1,4 +0,0 @@
1
- export declare const EDI_DOCUMENT_TYPE: Readonly<Record<number, {
2
- name: string;
3
- edifactId?: string;
4
- }>>;