@dereekb/util 2.1.0 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (245) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/package.json +13 -5
  3. package/src/index.d.ts +0 -1
  4. package/src/index.js +1 -2
  5. package/src/index.js.map +1 -1
  6. package/src/lib/array/array.boolean.d.ts +2 -2
  7. package/src/lib/array/array.boolean.js +1 -1
  8. package/src/lib/array/array.boolean.js.map +1 -1
  9. package/src/lib/array/array.d.ts +24 -2
  10. package/src/lib/array/array.index.d.ts +1 -1
  11. package/src/lib/array/array.js +37 -2
  12. package/src/lib/array/array.js.map +1 -1
  13. package/src/lib/array/array.limit.d.ts +1 -1
  14. package/src/lib/array/array.make.d.ts +1 -1
  15. package/src/lib/array/array.make.js +2 -2
  16. package/src/lib/array/array.make.js.map +1 -1
  17. package/src/lib/array/array.map.d.ts +1 -1
  18. package/src/lib/array/array.set.d.ts +2 -16
  19. package/src/lib/array/array.set.js +21 -55
  20. package/src/lib/array/array.set.js.map +1 -1
  21. package/src/lib/array/array.string.d.ts +7 -5
  22. package/src/lib/array/array.string.js +14 -4
  23. package/src/lib/array/array.string.js.map +1 -1
  24. package/src/lib/array/array.unique.d.ts +1 -1
  25. package/src/lib/array/array.value.d.ts +15 -1
  26. package/src/lib/array/array.value.js +21 -1
  27. package/src/lib/array/array.value.js.map +1 -1
  28. package/src/lib/array/index.js +12 -12
  29. package/src/lib/array/index.js.map +1 -1
  30. package/src/lib/assertion/index.js +5 -5
  31. package/src/lib/assertion/index.js.map +1 -1
  32. package/src/lib/auth/auth.role.claims.d.ts +98 -0
  33. package/src/lib/auth/auth.role.claims.js +93 -0
  34. package/src/lib/auth/auth.role.claims.js.map +1 -0
  35. package/src/lib/auth/auth.role.d.ts +22 -0
  36. package/src/lib/auth/auth.role.js +17 -0
  37. package/src/lib/auth/auth.role.js.map +1 -0
  38. package/src/lib/auth/index.d.ts +2 -0
  39. package/src/lib/auth/index.js +6 -0
  40. package/src/lib/auth/index.js.map +1 -0
  41. package/src/lib/contact/index.js +3 -3
  42. package/src/lib/contact/index.js.map +1 -1
  43. package/src/lib/date/date.d.ts +1 -1
  44. package/src/lib/date/date.time.d.ts +1 -1
  45. package/src/lib/date/index.js +2 -2
  46. package/src/lib/date/index.js.map +1 -1
  47. package/src/lib/error/error.d.ts +6 -1
  48. package/src/lib/error/error.js +8 -1
  49. package/src/lib/error/error.js.map +1 -1
  50. package/src/lib/error/error.server.d.ts +5 -12
  51. package/src/lib/error/error.server.js.map +1 -1
  52. package/src/lib/error/index.js +2 -2
  53. package/src/lib/error/index.js.map +1 -1
  54. package/src/lib/filter/index.js +1 -1
  55. package/src/lib/filter/index.js.map +1 -1
  56. package/src/lib/function/function.forward.d.ts +9 -0
  57. package/src/lib/function/function.forward.js +18 -0
  58. package/src/lib/function/function.forward.js.map +1 -0
  59. package/src/lib/function/index.d.ts +1 -0
  60. package/src/lib/function/index.js +5 -0
  61. package/src/lib/function/index.js.map +1 -0
  62. package/src/lib/getter/getter.cache.d.ts +38 -0
  63. package/src/lib/getter/getter.cache.js +23 -0
  64. package/src/lib/getter/getter.cache.js.map +1 -0
  65. package/src/lib/getter/getter.d.ts +61 -0
  66. package/src/lib/getter/getter.js +48 -0
  67. package/src/lib/getter/getter.js.map +1 -0
  68. package/src/lib/getter/getter.map.d.ts +15 -0
  69. package/src/lib/getter/getter.map.js +24 -0
  70. package/src/lib/getter/getter.map.js.map +1 -0
  71. package/src/lib/getter/index.d.ts +3 -0
  72. package/src/lib/getter/index.js +7 -0
  73. package/src/lib/getter/index.js.map +1 -0
  74. package/src/lib/grouping.d.ts +4 -4
  75. package/src/lib/index.d.ts +9 -5
  76. package/src/lib/index.js +31 -28
  77. package/src/lib/index.js.map +1 -1
  78. package/src/lib/iterable/index.d.ts +2 -0
  79. package/src/lib/iterable/index.js +6 -0
  80. package/src/lib/iterable/index.js.map +1 -0
  81. package/src/lib/iterable/iterable.d.ts +53 -0
  82. package/src/lib/iterable/iterable.js +113 -0
  83. package/src/lib/iterable/iterable.js.map +1 -0
  84. package/src/lib/iterable/iterable.map.d.ts +8 -0
  85. package/src/lib/iterable/iterable.map.js +18 -0
  86. package/src/lib/iterable/iterable.map.js.map +1 -0
  87. package/src/lib/iterate.js +1 -1
  88. package/src/lib/key.d.ts +1 -1
  89. package/src/lib/map/index.d.ts +2 -0
  90. package/src/lib/map/index.js +6 -0
  91. package/src/lib/map/index.js.map +1 -0
  92. package/src/lib/map/map.d.ts +9 -0
  93. package/src/lib/map/map.intersection.d.ts +15 -0
  94. package/src/lib/map/map.intersection.js +24 -0
  95. package/src/lib/map/map.intersection.js.map +1 -0
  96. package/src/lib/map/map.js +17 -0
  97. package/src/lib/map/map.js.map +1 -0
  98. package/src/lib/misc/host.d.ts +5 -0
  99. package/src/lib/misc/host.js +13 -0
  100. package/src/lib/misc/host.js.map +1 -0
  101. package/src/lib/misc/index.d.ts +1 -0
  102. package/src/lib/misc/index.js +5 -0
  103. package/src/lib/misc/index.js.map +1 -0
  104. package/src/lib/model/index.d.ts +3 -0
  105. package/src/lib/model/index.js +7 -0
  106. package/src/lib/model/index.js.map +1 -0
  107. package/src/lib/model/model.conversion.d.ts +63 -0
  108. package/src/lib/model/model.conversion.js +66 -0
  109. package/src/lib/model/model.conversion.js.map +1 -0
  110. package/src/lib/model/model.copy.d.ts +16 -0
  111. package/src/lib/model/model.copy.js +20 -0
  112. package/src/lib/model/model.copy.js.map +1 -0
  113. package/src/lib/{model.d.ts → model/model.d.ts} +2 -2
  114. package/src/lib/{model.js → model/model.js} +3 -3
  115. package/src/lib/model/model.js.map +1 -0
  116. package/src/lib/number/factory.d.ts +22 -0
  117. package/src/lib/number/factory.js +22 -0
  118. package/src/lib/number/factory.js.map +1 -0
  119. package/src/lib/number/index.d.ts +3 -0
  120. package/src/lib/number/index.js +7 -0
  121. package/src/lib/number/index.js.map +1 -0
  122. package/src/lib/number/random.d.ts +13 -0
  123. package/src/lib/number/random.js +22 -0
  124. package/src/lib/number/random.js.map +1 -0
  125. package/src/lib/{number.d.ts → number/round.d.ts} +0 -13
  126. package/src/lib/{number.js → number/round.js} +2 -20
  127. package/src/lib/number/round.js.map +1 -0
  128. package/src/lib/object/index.d.ts +1 -0
  129. package/src/lib/object/index.js +4 -3
  130. package/src/lib/object/index.js.map +1 -1
  131. package/src/lib/object/object.d.ts +69 -8
  132. package/src/lib/object/object.equal.d.ts +1 -1
  133. package/src/lib/object/object.equal.js +3 -3
  134. package/src/lib/object/object.equal.js.map +1 -1
  135. package/src/lib/object/object.js +117 -11
  136. package/src/lib/object/object.js.map +1 -1
  137. package/src/lib/object/object.map.d.ts +35 -0
  138. package/src/lib/object/object.map.js +40 -0
  139. package/src/lib/object/object.map.js.map +1 -0
  140. package/src/lib/page/index.js +3 -3
  141. package/src/lib/page/index.js.map +1 -1
  142. package/src/lib/page/page.d.ts +1 -1
  143. package/src/lib/page/page.filter.js +1 -1
  144. package/src/lib/promise/index.d.ts +3 -0
  145. package/src/lib/promise/index.js +7 -4
  146. package/src/lib/promise/index.js.map +1 -1
  147. package/src/lib/promise/is.d.ts +7 -0
  148. package/src/lib/promise/is.js +15 -0
  149. package/src/lib/promise/is.js.map +1 -0
  150. package/src/lib/promise/map.d.ts +10 -0
  151. package/src/lib/promise/map.js +14 -0
  152. package/src/lib/promise/map.js.map +1 -0
  153. package/src/lib/promise/promise.d.ts +13 -1
  154. package/src/lib/promise/promise.js +26 -8
  155. package/src/lib/promise/promise.js.map +1 -1
  156. package/src/lib/promise/promise.loop.d.ts +18 -3
  157. package/src/lib/promise/promise.loop.js +18 -2
  158. package/src/lib/promise/promise.loop.js.map +1 -1
  159. package/src/lib/promise/promise.ref.d.ts +10 -0
  160. package/src/lib/promise/promise.ref.js +19 -0
  161. package/src/lib/promise/promise.ref.js.map +1 -0
  162. package/src/lib/promise/wait.js +2 -2
  163. package/src/lib/promise/wait.js.map +1 -1
  164. package/src/lib/relation/index.js +1 -1
  165. package/src/lib/relation/index.js.map +1 -1
  166. package/src/lib/relation/relation.js +2 -2
  167. package/src/lib/set/index.d.ts +4 -0
  168. package/src/lib/set/index.js +8 -0
  169. package/src/lib/set/index.js.map +1 -0
  170. package/src/lib/set/set.allowed.d.ts +23 -0
  171. package/src/lib/set/set.allowed.js +29 -0
  172. package/src/lib/set/set.allowed.js.map +1 -0
  173. package/src/lib/set/set.d.ts +53 -0
  174. package/src/lib/{set.hashset.d.ts → set/set.hashset.d.ts} +2 -2
  175. package/src/lib/{set.hashset.js → set/set.hashset.js} +0 -0
  176. package/src/lib/set/set.hashset.js.map +1 -0
  177. package/src/lib/set/set.js +114 -0
  178. package/src/lib/set/set.js.map +1 -0
  179. package/src/lib/set/set.maybe.d.ts +11 -0
  180. package/src/lib/set/set.maybe.js +22 -0
  181. package/src/lib/set/set.maybe.js.map +1 -0
  182. package/src/lib/sort.d.ts +1 -4
  183. package/src/lib/sort.js +3 -8
  184. package/src/lib/sort.js.map +1 -1
  185. package/src/lib/storage/index.js +4 -4
  186. package/src/lib/storage/index.js.map +1 -1
  187. package/src/lib/storage/storage.memory.d.ts +1 -1
  188. package/src/lib/storage/storage.object.d.ts +1 -1
  189. package/src/lib/string.d.ts +9 -2
  190. package/src/lib/string.js +11 -1
  191. package/src/lib/string.js.map +1 -1
  192. package/src/lib/tree/index.js +4 -4
  193. package/src/lib/tree/index.js.map +1 -1
  194. package/src/lib/tree/tree.expand.d.ts +1 -1
  195. package/src/lib/type.d.ts +17 -1
  196. package/src/lib/value/equal.d.ts +41 -0
  197. package/src/lib/value/equal.js +56 -0
  198. package/src/lib/value/equal.js.map +1 -0
  199. package/src/lib/value/index.d.ts +4 -0
  200. package/src/lib/value/index.js +8 -0
  201. package/src/lib/value/index.js.map +1 -0
  202. package/src/lib/value/map.d.ts +13 -0
  203. package/src/lib/{map.js → value/map.js} +0 -0
  204. package/src/lib/value/map.js.map +1 -0
  205. package/src/lib/{value.d.ts → value/maybe.d.ts} +33 -4
  206. package/src/lib/{value.js → value/maybe.js} +35 -5
  207. package/src/lib/value/maybe.js.map +1 -0
  208. package/src/lib/value/modifier.d.ts +58 -0
  209. package/src/lib/value/modifier.js +69 -0
  210. package/src/lib/value/modifier.js.map +1 -0
  211. package/test/CHANGELOG.md +9 -0
  212. package/test/README.md +11 -0
  213. package/test/package.json +14 -0
  214. package/test/src/index.d.ts +1 -0
  215. package/test/src/index.js +5 -0
  216. package/test/src/index.js.map +1 -0
  217. package/{src/test → test/src/lib}/index.d.ts +1 -0
  218. package/test/src/lib/index.js +7 -0
  219. package/test/src/lib/index.js.map +1 -0
  220. package/{src/test → test/src/lib}/jest.d.ts +21 -1
  221. package/test/src/lib/jest.function.d.ts +9 -0
  222. package/test/src/lib/jest.function.js +14 -0
  223. package/test/src/lib/jest.function.js.map +1 -0
  224. package/test/src/lib/jest.js +108 -0
  225. package/test/src/lib/jest.js.map +1 -0
  226. package/{src/test → test/src/lib}/jest.wrap.d.ts +0 -0
  227. package/{src/test → test/src/lib}/jest.wrap.js +5 -5
  228. package/test/src/lib/jest.wrap.js.map +1 -0
  229. package/src/lib/getter.d.ts +0 -26
  230. package/src/lib/getter.js +0 -13
  231. package/src/lib/getter.js.map +0 -1
  232. package/src/lib/map.d.ts +0 -2
  233. package/src/lib/map.js.map +0 -1
  234. package/src/lib/model.js.map +0 -1
  235. package/src/lib/number.js.map +0 -1
  236. package/src/lib/set.d.ts +0 -0
  237. package/src/lib/set.hashset.js.map +0 -1
  238. package/src/lib/set.js +0 -2
  239. package/src/lib/set.js.map +0 -1
  240. package/src/lib/value.js.map +0 -1
  241. package/src/test/index.js +0 -6
  242. package/src/test/index.js.map +0 -1
  243. package/src/test/jest.js +0 -80
  244. package/src/test/jest.js.map +0 -1
  245. package/src/test/jest.wrap.js.map +0 -1
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.allObjectsAreEqual = exports.areEqualContext = exports.isEqualContext = void 0;
4
+ const iterable_1 = require("./../iterable/iterable");
5
+ /**
6
+ * Creates an IsEqualContext
7
+ *
8
+ * @param contextValue
9
+ * @param fn
10
+ * @returns
11
+ */
12
+ function isEqualContext(contextValue, fn) {
13
+ return (value) => {
14
+ return fn(contextValue, value);
15
+ };
16
+ }
17
+ exports.isEqualContext = isEqualContext;
18
+ /**
19
+ * Creates an AreEqualContext
20
+ *
21
+ * @param contextValue
22
+ * @param fn
23
+ * @returns
24
+ */
25
+ function areEqualContext(contextValue, fn) {
26
+ const isEqual = isEqualContext(contextValue, fn);
27
+ return (input) => {
28
+ let areEqual = false;
29
+ if ((0, iterable_1.isIterable)(input)) {
30
+ areEqual = !(0, iterable_1.existsInIterable)(input, (x) => !isEqual(x));
31
+ }
32
+ else {
33
+ areEqual = isEqual(input);
34
+ }
35
+ return areEqual;
36
+ };
37
+ }
38
+ exports.areEqualContext = areEqualContext;
39
+ /**
40
+ * Returns true if all input values are equal.
41
+ *
42
+ * Arrays that are empty or have one value will return true by default.
43
+ *
44
+ * @param values
45
+ * @param fn
46
+ * @returns
47
+ */
48
+ function allObjectsAreEqual(values, fn) {
49
+ if ((0, iterable_1.isIterable)(values)) {
50
+ const firstValues = (0, iterable_1.takeValuesFromIterable)(values, 2);
51
+ return (firstValues.length > 1) ? areEqualContext(firstValues[0], fn)(values) : true;
52
+ }
53
+ return true;
54
+ }
55
+ exports.allObjectsAreEqual = allObjectsAreEqual;
56
+ //# sourceMappingURL=equal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"equal.js","sourceRoot":"","sources":["../../../../../../packages/util/src/lib/value/equal.ts"],"names":[],"mappings":";;;AAAA,qDAAuJ;AAmBvJ;;;;;;GAMG;AACH,SAAgB,cAAc,CAAI,YAAe,EAAE,EAAsB;IACvE,OAAO,CAAC,KAAK,EAAE,EAAE;QACf,OAAO,EAAE,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;IACjC,CAAC,CAAC;AACJ,CAAC;AAJD,wCAIC;AAED;;;;;;GAMG;AACH,SAAgB,eAAe,CAAI,YAAe,EAAE,EAAsB;IACxE,MAAM,OAAO,GAAG,cAAc,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;IAEjD,OAAO,CAAC,KAAyB,EAAE,EAAE;QACnC,IAAI,QAAQ,GAAG,KAAK,CAAC;QAErB,IAAI,IAAA,qBAAU,EAAC,KAAK,CAAC,EAAE;YACrB,QAAQ,GAAG,CAAC,IAAA,2BAAgB,EAAC,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;SACzD;aAAM;YACL,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;SAC3B;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC,CAAC;AACJ,CAAC;AAdD,0CAcC;AAED;;;;;;;;GAQG;AACH,SAAgB,kBAAkB,CAAI,MAA0B,EAAE,EAAsB;IACtF,IAAI,IAAA,qBAAU,EAAC,MAAM,CAAC,EAAE;QACtB,MAAM,WAAW,GAAG,IAAA,iCAAsB,EAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QACtD,OAAO,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;KACtF;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAPD,gDAOC"}
@@ -0,0 +1,4 @@
1
+ export * from './equal';
2
+ export * from './map';
3
+ export * from './maybe';
4
+ export * from './modifier';
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./equal"), exports);
5
+ tslib_1.__exportStar(require("./map"), exports);
6
+ tslib_1.__exportStar(require("./maybe"), exports);
7
+ tslib_1.__exportStar(require("./modifier"), exports);
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/util/src/lib/value/index.ts"],"names":[],"mappings":";;;AAAA,kDAAwB;AACxB,gDAAsB;AACtB,kDAAwB;AACxB,qDAA2B"}
@@ -0,0 +1,13 @@
1
+ import { Maybe } from "./maybe";
2
+ /**
3
+ * Converts one value to another.
4
+ */
5
+ export declare type MapFunction<I, O> = (input: I) => O;
6
+ /**
7
+ * Converts values from the input, and applies them to the target if a target is supplied.
8
+ */
9
+ export declare type ApplyMapFunction<I, O> = (input: I, target?: Maybe<Partial<O>>) => O;
10
+ /**
11
+ * Converts values from the input, and applies them to the target if a target is supplied.
12
+ */
13
+ export declare type ApplyMapFunctionWithOptions<I, O, C> = (input: I, target?: Maybe<Partial<O>>, options?: Maybe<C>) => O;
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"map.js","sourceRoot":"","sources":["../../../../../../packages/util/src/lib/value/map.ts"],"names":[],"mappings":""}
@@ -1,7 +1,15 @@
1
+ /**
2
+ * A null/undefined value.
3
+ */
4
+ export declare type MaybeNot = null | undefined;
5
+ /**
6
+ * A non-null/undefined value.
7
+ */
8
+ export declare type MaybeSo<T = any> = T extends MaybeNot ? never : T;
1
9
  /**
2
10
  * A value that might exist, or be null/undefined instead.
3
11
  */
4
- export declare type Maybe<T> = T | null | undefined;
12
+ export declare type Maybe<T> = T | MaybeNot;
5
13
  /**
6
14
  * Returns true if the value is not null or undefined.
7
15
  *
@@ -34,12 +42,33 @@ export declare function hasValueOrNotEmpty(value: ''): false;
34
42
  export declare function hasValueOrNotEmpty(value: null): false;
35
43
  export declare function hasValueOrNotEmpty(value: undefined): false;
36
44
  /**
37
- * True if the input is null/undefined and not false.
45
+ * True if the input is MaybeNot and not false.
46
+ *
47
+ * @param value
48
+ * @returns
49
+ */
50
+ export declare function isMaybeNotAndNotFalse(value: any): boolean;
51
+ /**
52
+ * True if the input is MaybeNot.
53
+ *
54
+ * @param value
55
+ * @returns
56
+ */
57
+ export declare function isMaybeNot(value: any): value is MaybeNot;
58
+ /**
59
+ * True if the input is MaybeSo
60
+ *
61
+ * @param value
62
+ * @returns
63
+ */
64
+ export declare function isMaybeSo<T>(value: Maybe<T>): value is MaybeSo<T>;
65
+ /**
66
+ * True if the input is MaybeNot and true.
38
67
  *
39
68
  * @param value
40
69
  * @returns
41
70
  */
42
- export declare function isUndefinedAndNotFalse(value: any): boolean;
71
+ export declare function isMaybeNotOrTrue(value: any): value is MaybeNot | true;
43
72
  /**
44
73
  * True if the input is not null/undefined/false.
45
74
  *
@@ -54,4 +83,4 @@ export declare function isDefinedAndNotFalse(value: any): boolean;
54
83
  * @param b
55
84
  * @returns
56
85
  */
57
- export declare function isSameNonNullValue<T>(a: Maybe<T>, b: Maybe<T>): a is T;
86
+ export declare function isSameNonNullValue<T>(a: Maybe<T>, b: Maybe<T>): a is NonNullable<T>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isSameNonNullValue = exports.isDefinedAndNotFalse = exports.isUndefinedAndNotFalse = exports.hasValueOrNotEmpty = exports.hasNonNullValue = void 0;
3
+ exports.isSameNonNullValue = exports.isDefinedAndNotFalse = exports.isMaybeNotOrTrue = exports.isMaybeSo = exports.isMaybeNot = exports.isMaybeNotAndNotFalse = exports.hasValueOrNotEmpty = exports.hasNonNullValue = void 0;
4
4
  function hasNonNullValue(value) {
5
5
  return value != null;
6
6
  }
@@ -15,15 +15,45 @@ function hasValueOrNotEmpty(value) {
15
15
  }
16
16
  exports.hasValueOrNotEmpty = hasValueOrNotEmpty;
17
17
  /**
18
- * True if the input is null/undefined and not false.
18
+ * True if the input is MaybeNot and not false.
19
19
  *
20
20
  * @param value
21
21
  * @returns
22
22
  */
23
- function isUndefinedAndNotFalse(value) {
23
+ function isMaybeNotAndNotFalse(value) {
24
24
  return value == null && value !== false;
25
25
  }
26
- exports.isUndefinedAndNotFalse = isUndefinedAndNotFalse;
26
+ exports.isMaybeNotAndNotFalse = isMaybeNotAndNotFalse;
27
+ /**
28
+ * True if the input is MaybeNot.
29
+ *
30
+ * @param value
31
+ * @returns
32
+ */
33
+ function isMaybeNot(value) {
34
+ return value == null;
35
+ }
36
+ exports.isMaybeNot = isMaybeNot;
37
+ /**
38
+ * True if the input is MaybeSo
39
+ *
40
+ * @param value
41
+ * @returns
42
+ */
43
+ function isMaybeSo(value) {
44
+ return !isMaybeNot(value);
45
+ }
46
+ exports.isMaybeSo = isMaybeSo;
47
+ /**
48
+ * True if the input is MaybeNot and true.
49
+ *
50
+ * @param value
51
+ * @returns
52
+ */
53
+ function isMaybeNotOrTrue(value) {
54
+ return value == null || value === true;
55
+ }
56
+ exports.isMaybeNotOrTrue = isMaybeNotOrTrue;
27
57
  /**
28
58
  * True if the input is not null/undefined/false.
29
59
  *
@@ -45,4 +75,4 @@ function isSameNonNullValue(a, b) {
45
75
  return (a === b && a != null);
46
76
  }
47
77
  exports.isSameNonNullValue = isSameNonNullValue;
48
- //# sourceMappingURL=value.js.map
78
+ //# sourceMappingURL=maybe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"maybe.js","sourceRoot":"","sources":["../../../../../../packages/util/src/lib/value/maybe.ts"],"names":[],"mappings":";;;AA8BA,SAAgB,eAAe,CAAI,KAAe;IAChD,OAAO,KAAK,IAAI,IAAI,CAAC;AACvB,CAAC;AAFD,0CAEC;AAmBD,SAAgB,kBAAkB,CAAC,KAAU;IAC3C,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACxB,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;KACzB;SAAM;QACL,OAAO,KAAK,IAAI,IAAI,IAAI,KAAK,KAAK,EAAE,CAAC;KACtC;AACH,CAAC;AAND,gDAMC;AAED;;;;;GAKG;AACH,SAAgB,qBAAqB,CAAC,KAAU;IAC9C,OAAO,KAAK,IAAI,IAAI,IAAI,KAAK,KAAK,KAAK,CAAC;AAC1C,CAAC;AAFD,sDAEC;AAED;;;;;GAKG;AACH,SAAgB,UAAU,CAAC,KAAU;IACnC,OAAO,KAAK,IAAI,IAAI,CAAC;AACvB,CAAC;AAFD,gCAEC;AAED;;;;;GAKG;AACH,SAAgB,SAAS,CAAI,KAAe;IAC1C,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;AAC5B,CAAC;AAFD,8BAEC;AAED;;;;;GAKG;AACH,SAAgB,gBAAgB,CAAC,KAAU;IACzC,OAAO,KAAK,IAAI,IAAI,IAAI,KAAK,KAAK,IAAI,CAAC;AACzC,CAAC;AAFD,4CAEC;AAED;;;;;GAKG;AACH,SAAgB,oBAAoB,CAAC,KAAU;IAC7C,OAAO,KAAK,IAAI,IAAI,IAAI,KAAK,KAAK,KAAK,CAAC;AAC1C,CAAC;AAFD,oDAEC;AAED;;;;;;GAMG;AACH,SAAgB,kBAAkB,CAAI,CAAW,EAAE,CAAW;IAC5D,OAAO,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC;AAChC,CAAC;AAFD,gDAEC"}
@@ -0,0 +1,58 @@
1
+ import { ArrayOrValue } from "../array";
2
+ import { Maybe } from "./maybe";
3
+ /**
4
+ * Modifier key
5
+ */
6
+ export declare type ModifierKey = string;
7
+ /**
8
+ * Modifies the input value.
9
+ */
10
+ export declare type ModifierFunction<T> = (input: T) => void;
11
+ /**
12
+ * A modifier that has a key and modify function.
13
+ */
14
+ export interface Modifier<T> {
15
+ /**
16
+ * Modifier key.
17
+ */
18
+ readonly key: ModifierKey;
19
+ /**
20
+ *
21
+ */
22
+ readonly modify: ModifierFunction<T>;
23
+ }
24
+ /**
25
+ * Creates a new modifier
26
+ *
27
+ * @param key
28
+ * @param modify
29
+ * @returns
30
+ */
31
+ export declare function modifier<T>(key: string, modify: ModifierFunction<T>): Modifier<T>;
32
+ /**
33
+ * Map of Modifiers keyed by the modifier key.
34
+ */
35
+ export declare type ModifierMap<T> = Map<ModifierKey, Modifier<T>>;
36
+ /**
37
+ * Adds a modifier to the modifier map and returns the map.
38
+ *
39
+ * @param modifier
40
+ * @param map
41
+ * @returns
42
+ */
43
+ export declare function addModifiers<T>(modifiers: ArrayOrValue<Modifier<T>>, map?: Maybe<ModifierMap<T>>): ModifierMap<T>;
44
+ /**
45
+ * Removes a modifier from the modifier map and returns the map.
46
+ *
47
+ * @param modifier
48
+ * @param map
49
+ */
50
+ export declare function removeModifiers<T>(modifiers: ArrayOrValue<Modifier<T>>, map: Maybe<ModifierMap<T>>): ModifierMap<T>;
51
+ export declare function modifierMapToFunction<T>(map: Maybe<ModifierMap<T>>): ModifierFunction<T>;
52
+ /**
53
+ * Converts a ModifierMap to a ModifierFunction if the map is input or has functions. Otherwise returns undefined.
54
+ *
55
+ * @param map
56
+ * @returns
57
+ */
58
+ export declare function maybeModifierMapToFunction<T>(map: Maybe<ModifierMap<T>>): Maybe<ModifierFunction<T>>;
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.maybeModifierMapToFunction = exports.modifierMapToFunction = exports.removeModifiers = exports.addModifiers = exports.modifier = void 0;
4
+ const array_1 = require("../array");
5
+ /**
6
+ * Creates a new modifier
7
+ *
8
+ * @param key
9
+ * @param modify
10
+ * @returns
11
+ */
12
+ function modifier(key, modify) {
13
+ return {
14
+ key,
15
+ modify
16
+ };
17
+ }
18
+ exports.modifier = modifier;
19
+ /**
20
+ * Adds a modifier to the modifier map and returns the map.
21
+ *
22
+ * @param modifier
23
+ * @param map
24
+ * @returns
25
+ */
26
+ function addModifiers(modifiers, map) {
27
+ if (!map) {
28
+ map = new Map();
29
+ }
30
+ (0, array_1.forEachWithArray)(modifiers, (modifier) => map.set(modifier.key, modifier));
31
+ return map;
32
+ }
33
+ exports.addModifiers = addModifiers;
34
+ /**
35
+ * Removes a modifier from the modifier map and returns the map.
36
+ *
37
+ * @param modifier
38
+ * @param map
39
+ */
40
+ function removeModifiers(modifiers, map) {
41
+ if (map) {
42
+ (0, array_1.forEachWithArray)(modifiers, (modifier) => map.delete(modifier.key));
43
+ }
44
+ else {
45
+ map = new Map();
46
+ }
47
+ return map;
48
+ }
49
+ exports.removeModifiers = removeModifiers;
50
+ function modifierMapToFunction(map) {
51
+ var _a;
52
+ return (_a = maybeModifierMapToFunction(map)) !== null && _a !== void 0 ? _a : (() => undefined);
53
+ }
54
+ exports.modifierMapToFunction = modifierMapToFunction;
55
+ /**
56
+ * Converts a ModifierMap to a ModifierFunction if the map is input or has functions. Otherwise returns undefined.
57
+ *
58
+ * @param map
59
+ * @returns
60
+ */
61
+ function maybeModifierMapToFunction(map) {
62
+ const fns = [];
63
+ map === null || map === void 0 ? void 0 : map.forEach((x) => fns.push(x.modify));
64
+ return (input) => {
65
+ fns.forEach((fn) => fn(input));
66
+ };
67
+ }
68
+ exports.maybeModifierMapToFunction = maybeModifierMapToFunction;
69
+ //# sourceMappingURL=modifier.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modifier.js","sourceRoot":"","sources":["../../../../../../packages/util/src/lib/value/modifier.ts"],"names":[],"mappings":";;;AAAA,oCAA0D;AA8B1D;;;;;;GAMG;AACH,SAAgB,QAAQ,CAAI,GAAW,EAAE,MAA2B;IAClE,OAAO;QACL,GAAG;QACH,MAAM;KACP,CAAC;AACJ,CAAC;AALD,4BAKC;AAOD;;;;;;GAMG;AACH,SAAgB,YAAY,CAAI,SAAoC,EAAE,GAA2B;IAC/F,IAAI,CAAC,GAAG,EAAE;QACR,GAAG,GAAG,IAAI,GAAG,EAAE,CAAC;KACjB;IAED,IAAA,wBAAgB,EAAC,SAAS,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,GAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC;IAE5E,OAAO,GAAG,CAAC;AACb,CAAC;AARD,oCAQC;AAED;;;;;GAKG;AACH,SAAgB,eAAe,CAAI,SAAoC,EAAE,GAA0B;IACjG,IAAI,GAAG,EAAE;QACP,IAAA,wBAAgB,EAAC,SAAS,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,GAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;KACtE;SAAM;QACL,GAAG,GAAG,IAAI,GAAG,EAAE,CAAC;KACjB;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AARD,0CAQC;AAGD,SAAgB,qBAAqB,CAAI,GAA0B;;IACjE,OAAO,MAAA,0BAA0B,CAAC,GAAG,CAAC,mCAAI,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;AAC9D,CAAC;AAFD,sDAEC;AAGD;;;;;GAKG;AACH,SAAgB,0BAA0B,CAAI,GAA0B;IACtE,MAAM,GAAG,GAA0B,EAAE,CAAC;IACtC,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;IACxC,OAAO,CAAC,KAAK,EAAE,EAAE;QACf,GAAG,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IACjC,CAAC,CAAC;AACJ,CAAC;AAND,gEAMC"}
@@ -0,0 +1,9 @@
1
+ # Changelog
2
+
3
+ This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
+
5
+ ## [4.0.1](https://github.com/dereekb/dbx-components/compare/v4.0.0-dev...v4.0.1) (2022-05-14)
6
+
7
+
8
+
9
+ # [4.0.0](https://github.com/dereekb/dbx-components/compare/v3.0.0...v4.0.0) (2022-05-14)
package/test/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # util-test
2
+
3
+ This library was generated with [Nx](https://nx.dev).
4
+
5
+ ## Running unit tests
6
+
7
+ Run `nx test util-test` to execute the unit tests via [Jest](https://jestjs.io).
8
+
9
+ ## Running lint
10
+
11
+ Run `nx lint util-test` to execute the lint via [ESLint](https://eslint.org/).
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "@dereekb/util/test",
3
+ "version": "4.0.1",
4
+ "main": "./src/index.js",
5
+ "typings": "./src/index.d.ts",
6
+ "dependencies": {},
7
+ "peerDependencies": {
8
+ "@dereekb/util": "4.0.1",
9
+ "make-error": "^1.3.0",
10
+ "extra-set": "^2.2.11",
11
+ "change-case": "^4.1.2",
12
+ "tslib": "^2.0.0"
13
+ }
14
+ }
@@ -0,0 +1 @@
1
+ export * from './lib';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./lib"), exports);
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/util/test/src/index.ts"],"names":[],"mappings":";;;AAAA,gDAAsB"}
@@ -1,2 +1,3 @@
1
1
  export * from './jest';
2
2
  export * from './jest.wrap';
3
+ export * from './jest.function';
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./jest"), exports);
5
+ tslib_1.__exportStar(require("./jest.wrap"), exports);
6
+ tslib_1.__exportStar(require("./jest.function"), exports);
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/util/test/src/lib/index.ts"],"names":[],"mappings":";;;AAAA,iDAAuB;AACvB,sDAA4B;AAC5B,0DAAgC"}
@@ -1,3 +1,4 @@
1
+ import { PromiseOrValue } from '@dereekb/util';
1
2
  /**
2
3
  * A fixture instance that is generated new for each test run.
3
4
  */
@@ -13,6 +14,8 @@ export interface JestTestFixture<I> {
13
14
  export declare type JestTestContextFixtureClearInstanceFunction = () => void;
14
15
  /**
15
16
  * JestTestFixture with additional functions that the JestTestContextFactory sees for managing the instance.
17
+ *
18
+ * The fixture is used as a refernce point for the Instance that is changed between each test.
16
19
  */
17
20
  export interface JestTestContextFixture<I> extends JestTestFixture<I> {
18
21
  /**
@@ -32,6 +35,13 @@ export declare abstract class AbstractJestTestContextFixture<I> implements JestT
32
35
  get instance(): I;
33
36
  setInstance(instance: I): JestTestContextFixtureClearInstanceFunction;
34
37
  }
38
+ /**
39
+ * Abstract JestTestContextFixture instance with a parent.
40
+ */
41
+ export declare abstract class AbstractChildJestTestContextFixture<I, P extends JestTestContextFixture<any>> extends AbstractJestTestContextFixture<I> {
42
+ readonly parent: P;
43
+ constructor(parent: P);
44
+ }
35
45
  export declare type JestBuildTestsWithContextFunction<F> = (fixture: F) => void;
36
46
  /**
37
47
  * Used for Jest tests to execute a number of tests using the fixture.
@@ -49,7 +59,7 @@ export interface JestTestContextBuilderConfig<I, F extends JestTestContextFixtur
49
59
  */
50
60
  buildConfig: (config?: Partial<C>) => C;
51
61
  /**
52
- * Builds a new fixture to use across all tests encapsulated tests.
62
+ * Builds a new fixture to use across all encapsulated tests.
53
63
  */
54
64
  buildFixture: (config: C) => F;
55
65
  /**
@@ -78,3 +88,13 @@ export interface JestTestContextBuilderConfig<I, F extends JestTestContextFixtur
78
88
  * @returns
79
89
  */
80
90
  export declare function jestTestContextBuilder<I, F extends JestTestContextFixture<I>, C>(builder: JestTestContextBuilderConfig<I, F, C>): JestTestContextBuilderFunction<I, F, C>;
91
+ export interface UseJestContextFixture<C extends JestTestContextFixture<I>, I> {
92
+ readonly fixture: C;
93
+ readonly buildTests: JestBuildTestsWithContextFunction<C>;
94
+ initInstance(): PromiseOrValue<I>;
95
+ destroyInstance?(instance: I): PromiseOrValue<void>;
96
+ }
97
+ /**
98
+ * Creates a test context and jest configurations that will initialize an instance
99
+ */
100
+ export declare function useJestContextFixture<C extends JestTestContextFixture<I>, I>(config: UseJestContextFixture<C, I>): void;
@@ -0,0 +1,9 @@
1
+ import { Getter } from "@dereekb/util";
2
+ export interface UseJestFunctionFixture<I extends (...args: any[]) => O, O = any> {
3
+ fn: Getter<I>;
4
+ }
5
+ export declare type JestFunctionFixtureBuildTests<I> = (fn: I) => void;
6
+ /**
7
+ * Creates a test context and jest configurations that provides a function to build tests based on the configuration.
8
+ */
9
+ export declare function useJestFunctionFixture<I extends (...args: any[]) => O, O = any>(config: UseJestFunctionFixture<I, O>, buildTests: JestFunctionFixtureBuildTests<I>): void;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useJestFunctionFixture = void 0;
4
+ const util_1 = require("@dereekb/util");
5
+ /**
6
+ * Creates a test context and jest configurations that provides a function to build tests based on the configuration.
7
+ */
8
+ function useJestFunctionFixture(config, buildTests) {
9
+ const { fn } = config;
10
+ const forward = (0, util_1.forwardFunction)(fn);
11
+ buildTests(forward);
12
+ }
13
+ exports.useJestFunctionFixture = useJestFunctionFixture;
14
+ //# sourceMappingURL=jest.function.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jest.function.js","sourceRoot":"","sources":["../../../../../../packages/util/test/src/lib/jest.function.ts"],"names":[],"mappings":";;;AAAA,wCAAwD;AAQxD;;GAEG;AACH,SAAgB,sBAAsB,CAA2C,MAAoC,EAAE,UAA4C;IACjK,MAAM,EAAE,EAAE,EAAE,GAAG,MAAM,CAAC;IAEtB,MAAM,OAAO,GAAG,IAAA,sBAAe,EAAC,EAAE,CAAC,CAAC;IACpC,UAAU,CAAC,OAAO,CAAC,CAAC;AACtB,CAAC;AALD,wDAKC"}
@@ -0,0 +1,108 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useJestContextFixture = exports.jestTestContextBuilder = exports.AbstractChildJestTestContextFixture = exports.AbstractJestTestContextFixture = void 0;
4
+ const tslib_1 = require("tslib");
5
+ /**
6
+ * Abstract JestTestContextFixture instance.
7
+ */
8
+ class AbstractJestTestContextFixture {
9
+ get instance() {
10
+ return this._instance;
11
+ }
12
+ setInstance(instance) {
13
+ if (this._instance != null) {
14
+ throw new Error(`The testing fixture is locked. Don't call setInstance() directly.`);
15
+ }
16
+ this._instance = instance;
17
+ return () => {
18
+ delete this._instance;
19
+ };
20
+ }
21
+ }
22
+ exports.AbstractJestTestContextFixture = AbstractJestTestContextFixture;
23
+ /**
24
+ * Abstract JestTestContextFixture instance with a parent.
25
+ */
26
+ class AbstractChildJestTestContextFixture extends AbstractJestTestContextFixture {
27
+ constructor(parent) {
28
+ super();
29
+ this.parent = parent;
30
+ }
31
+ }
32
+ exports.AbstractChildJestTestContextFixture = AbstractChildJestTestContextFixture;
33
+ /**
34
+ * Creates a JestTestContextBuilderFunction given the input builder.
35
+ *
36
+ * @param builder
37
+ * @returns
38
+ */
39
+ function jestTestContextBuilder(builder) {
40
+ return (inputConfig) => {
41
+ const config = builder.buildConfig(inputConfig);
42
+ return (buildTests) => {
43
+ const fixture = builder.buildFixture(config);
44
+ // Before
45
+ if (builder.beforeEach != null) {
46
+ beforeEach(builder.beforeEach);
47
+ }
48
+ useJestContextFixture({
49
+ fixture,
50
+ /**
51
+ * Build tests by passing the fixture to the testing functions.
52
+ *
53
+ * This will inject all tests and sub Jest lifecycle items.
54
+ */
55
+ buildTests,
56
+ initInstance: () => builder.setupInstance(config),
57
+ destroyInstance: (instance) => builder.teardownInstance(instance, config)
58
+ });
59
+ // After
60
+ if (builder.afterEach != null) {
61
+ afterEach(builder.afterEach);
62
+ }
63
+ };
64
+ };
65
+ }
66
+ exports.jestTestContextBuilder = jestTestContextBuilder;
67
+ /**
68
+ * Creates a test context and jest configurations that will initialize an instance
69
+ */
70
+ function useJestContextFixture(config) {
71
+ const { buildTests, fixture, initInstance, destroyInstance } = config;
72
+ let clearInstance;
73
+ let instance;
74
+ // Create an instance
75
+ beforeEach(() => tslib_1.__awaiter(this, void 0, void 0, function* () {
76
+ try {
77
+ instance = yield initInstance();
78
+ clearInstance = fixture.setInstance(instance);
79
+ }
80
+ catch (e) {
81
+ console.error('Failed building a test instance due to an error in buildInstance(). Error: ', e);
82
+ if (clearInstance) {
83
+ clearInstance();
84
+ }
85
+ throw e;
86
+ }
87
+ }));
88
+ // Cleanup
89
+ afterEach(() => tslib_1.__awaiter(this, void 0, void 0, function* () {
90
+ clearInstance();
91
+ if (fixture.instance != null) {
92
+ console.warn('Expected instance to be set on fixture for cleanup but was set to something else.');
93
+ }
94
+ if (destroyInstance) {
95
+ try {
96
+ yield destroyInstance(instance);
97
+ instance = undefined;
98
+ }
99
+ catch (e) {
100
+ console.error('Failed due to error in destroyInstance()');
101
+ throw e;
102
+ }
103
+ }
104
+ }));
105
+ buildTests(fixture);
106
+ }
107
+ exports.useJestContextFixture = useJestContextFixture;
108
+ //# sourceMappingURL=jest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jest.js","sourceRoot":"","sources":["../../../../../../packages/util/test/src/lib/jest.ts"],"names":[],"mappings":"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"}
File without changes