@aglyn/shared-util-tools 1.0.0-beta.143

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 (288) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +7 -0
  3. package/package.json +39 -0
  4. package/src/index.d.ts +72 -0
  5. package/src/index.js +87 -0
  6. package/src/index.js.map +1 -0
  7. package/src/lib/apply-mixins.d.ts +24 -0
  8. package/src/lib/apply-mixins.js +31 -0
  9. package/src/lib/apply-mixins.js.map +1 -0
  10. package/src/lib/array/array-copy-deep.d.ts +6 -0
  11. package/src/lib/array/array-copy-deep.js +25 -0
  12. package/src/lib/array/array-copy-deep.js.map +1 -0
  13. package/src/lib/array/array-copy-shallow.d.ts +19 -0
  14. package/src/lib/array/array-copy-shallow.js +20 -0
  15. package/src/lib/array/array-copy-shallow.js.map +1 -0
  16. package/src/lib/array/array-from-length.d.ts +18 -0
  17. package/src/lib/array/array-from-length.js +23 -0
  18. package/src/lib/array/array-from-length.js.map +1 -0
  19. package/src/lib/array/array-from.d.ts +24 -0
  20. package/src/lib/array/array-from.js +26 -0
  21. package/src/lib/array/array-from.js.map +1 -0
  22. package/src/lib/array/array-move-at-index.d.ts +24 -0
  23. package/src/lib/array/array-move-at-index.js +32 -0
  24. package/src/lib/array/array-move-at-index.js.map +1 -0
  25. package/src/lib/array/array-of-entries-to-object.d.ts +23 -0
  26. package/src/lib/array/array-of-entries-to-object.js +26 -0
  27. package/src/lib/array/array-of-entries-to-object.js.map +1 -0
  28. package/src/lib/array/array-overrides.d.ts +29 -0
  29. package/src/lib/array/array-overrides.js +71 -0
  30. package/src/lib/array/array-overrides.js.map +1 -0
  31. package/src/lib/array/array-push-at-index.d.ts +28 -0
  32. package/src/lib/array/array-push-at-index.js +32 -0
  33. package/src/lib/array/array-push-at-index.js.map +1 -0
  34. package/src/lib/array/array-remove-at-index.d.ts +23 -0
  35. package/src/lib/array/array-remove-at-index.js +26 -0
  36. package/src/lib/array/array-remove-at-index.js.map +1 -0
  37. package/src/lib/array/array-remove-item.d.ts +23 -0
  38. package/src/lib/array/array-remove-item.js +27 -0
  39. package/src/lib/array/array-remove-item.js.map +1 -0
  40. package/src/lib/array/array-safe.d.ts +21 -0
  41. package/src/lib/array/array-safe.js +29 -0
  42. package/src/lib/array/array-safe.js.map +1 -0
  43. package/src/lib/array/array-sort-by-deep-property.d.ts +26 -0
  44. package/src/lib/array/array-sort-by-deep-property.js +39 -0
  45. package/src/lib/array/array-sort-by-deep-property.js.map +1 -0
  46. package/src/lib/array/array-sort-by.d.ts +26 -0
  47. package/src/lib/array/array-sort-by.js +36 -0
  48. package/src/lib/array/array-sort-by.js.map +1 -0
  49. package/src/lib/array/array-update-at-index.d.ts +18 -0
  50. package/src/lib/array/array-update-at-index.js +22 -0
  51. package/src/lib/array/array-update-at-index.js.map +1 -0
  52. package/src/lib/array/array-update.d.ts +23 -0
  53. package/src/lib/array/array-update.js +25 -0
  54. package/src/lib/array/array-update.js.map +1 -0
  55. package/src/lib/bitwise/bitwise-has-all-attributes.d.ts +18 -0
  56. package/src/lib/bitwise/bitwise-has-all-attributes.js +21 -0
  57. package/src/lib/bitwise/bitwise-has-all-attributes.js.map +1 -0
  58. package/src/lib/bitwise/bitwise-has-attribute.d.ts +18 -0
  59. package/src/lib/bitwise/bitwise-has-attribute.js +21 -0
  60. package/src/lib/bitwise/bitwise-has-attribute.js.map +1 -0
  61. package/src/lib/bitwise/bitwise-has-only-attributes.d.ts +18 -0
  62. package/src/lib/bitwise/bitwise-has-only-attributes.js +21 -0
  63. package/src/lib/bitwise/bitwise-has-only-attributes.js.map +1 -0
  64. package/src/lib/contrast.d.ts +65 -0
  65. package/src/lib/contrast.js +78 -0
  66. package/src/lib/contrast.js.map +1 -0
  67. package/src/lib/copy-shallow.d.ts +19 -0
  68. package/src/lib/copy-shallow.js +20 -0
  69. package/src/lib/copy-shallow.js.map +1 -0
  70. package/src/lib/copy.d.ts +19 -0
  71. package/src/lib/copy.js +20 -0
  72. package/src/lib/copy.js.map +1 -0
  73. package/src/lib/create-chained-function.d.ts +38 -0
  74. package/src/lib/create-chained-function.js +46 -0
  75. package/src/lib/create-chained-function.js.map +1 -0
  76. package/src/lib/crud.d.ts +46 -0
  77. package/src/lib/crud.js +55 -0
  78. package/src/lib/crud.js.map +1 -0
  79. package/src/lib/css.d.ts +41 -0
  80. package/src/lib/css.js +54 -0
  81. package/src/lib/css.js.map +1 -0
  82. package/src/lib/escape-html.d.ts +38 -0
  83. package/src/lib/escape-html.js +47 -0
  84. package/src/lib/escape-html.js.map +1 -0
  85. package/src/lib/falsy.d.ts +23 -0
  86. package/src/lib/falsy.js +25 -0
  87. package/src/lib/falsy.js.map +1 -0
  88. package/src/lib/get-display-name.d.ts +46 -0
  89. package/src/lib/get-display-name.js +64 -0
  90. package/src/lib/get-display-name.js.map +1 -0
  91. package/src/lib/get-property.d.ts +30 -0
  92. package/src/lib/get-property.js +36 -0
  93. package/src/lib/get-property.js.map +1 -0
  94. package/src/lib/get-static-field.d.ts +23 -0
  95. package/src/lib/get-static-field.js +25 -0
  96. package/src/lib/get-static-field.js.map +1 -0
  97. package/src/lib/guards/index.d.ts +46 -0
  98. package/src/lib/guards/index.js +47 -0
  99. package/src/lib/guards/index.js.map +1 -0
  100. package/src/lib/guards/lib/_has-own-property.d.ts +24 -0
  101. package/src/lib/guards/lib/_has-own-property.js +27 -0
  102. package/src/lib/guards/lib/_has-own-property.js.map +1 -0
  103. package/src/lib/guards/lib/_is-arr-empty.d.ts +23 -0
  104. package/src/lib/guards/lib/_is-arr-empty.js +25 -0
  105. package/src/lib/guards/lib/_is-arr-empty.js.map +1 -0
  106. package/src/lib/guards/lib/_is-arr-of-arr.d.ts +25 -0
  107. package/src/lib/guards/lib/_is-arr-of-arr.js +31 -0
  108. package/src/lib/guards/lib/_is-arr-of-arr.js.map +1 -0
  109. package/src/lib/guards/lib/_is-arr.d.ts +21 -0
  110. package/src/lib/guards/lib/_is-arr.js +23 -0
  111. package/src/lib/guards/lib/_is-arr.js.map +1 -0
  112. package/src/lib/guards/lib/_is-big.d.ts +25 -0
  113. package/src/lib/guards/lib/_is-big.js +27 -0
  114. package/src/lib/guards/lib/_is-big.js.map +1 -0
  115. package/src/lib/guards/lib/_is-bool.d.ts +25 -0
  116. package/src/lib/guards/lib/_is-bool.js +27 -0
  117. package/src/lib/guards/lib/_is-bool.js.map +1 -0
  118. package/src/lib/guards/lib/_is-buff.d.ts +25 -0
  119. package/src/lib/guards/lib/_is-buff.js +29 -0
  120. package/src/lib/guards/lib/_is-buff.js.map +1 -0
  121. package/src/lib/guards/lib/_is-ctor.d.ts +25 -0
  122. package/src/lib/guards/lib/_is-ctor.js +30 -0
  123. package/src/lib/guards/lib/_is-ctor.js.map +1 -0
  124. package/src/lib/guards/lib/_is-empty-str-or-arr.d.ts +25 -0
  125. package/src/lib/guards/lib/_is-empty-str-or-arr.js +29 -0
  126. package/src/lib/guards/lib/_is-empty-str-or-arr.js.map +1 -0
  127. package/src/lib/guards/lib/_is-equality-same-type.d.ts +25 -0
  128. package/src/lib/guards/lib/_is-equality-same-type.js +33 -0
  129. package/src/lib/guards/lib/_is-equality-same-type.js.map +1 -0
  130. package/src/lib/guards/lib/_is-fn-t.d.ts +25 -0
  131. package/src/lib/guards/lib/_is-fn-t.js +27 -0
  132. package/src/lib/guards/lib/_is-fn-t.js.map +1 -0
  133. package/src/lib/guards/lib/_is-length-of.d.ts +47 -0
  134. package/src/lib/guards/lib/_is-length-of.js +49 -0
  135. package/src/lib/guards/lib/_is-length-of.js.map +1 -0
  136. package/src/lib/guards/lib/_is-length.d.ts +25 -0
  137. package/src/lib/guards/lib/_is-length.js +34 -0
  138. package/src/lib/guards/lib/_is-length.js.map +1 -0
  139. package/src/lib/guards/lib/_is-null.d.ts +25 -0
  140. package/src/lib/guards/lib/_is-null.js +27 -0
  141. package/src/lib/guards/lib/_is-null.js.map +1 -0
  142. package/src/lib/guards/lib/_is-num-neg.d.ts +25 -0
  143. package/src/lib/guards/lib/_is-num-neg.js +28 -0
  144. package/src/lib/guards/lib/_is-num-neg.js.map +1 -0
  145. package/src/lib/guards/lib/_is-num-pos.d.ts +25 -0
  146. package/src/lib/guards/lib/_is-num-pos.js +28 -0
  147. package/src/lib/guards/lib/_is-num-pos.js.map +1 -0
  148. package/src/lib/guards/lib/_is-num-t.d.ts +25 -0
  149. package/src/lib/guards/lib/_is-num-t.js +27 -0
  150. package/src/lib/guards/lib/_is-num-t.js.map +1 -0
  151. package/src/lib/guards/lib/_is-num-zero.d.ts +25 -0
  152. package/src/lib/guards/lib/_is-num-zero.js +28 -0
  153. package/src/lib/guards/lib/_is-num-zero.js.map +1 -0
  154. package/src/lib/guards/lib/_is-num.d.ts +26 -0
  155. package/src/lib/guards/lib/_is-num.js +29 -0
  156. package/src/lib/guards/lib/_is-num.js.map +1 -0
  157. package/src/lib/guards/lib/_is-obj-t.d.ts +26 -0
  158. package/src/lib/guards/lib/_is-obj-t.js +28 -0
  159. package/src/lib/guards/lib/_is-obj-t.js.map +1 -0
  160. package/src/lib/guards/lib/_is-obj.d.ts +27 -0
  161. package/src/lib/guards/lib/_is-obj.js +32 -0
  162. package/src/lib/guards/lib/_is-obj.js.map +1 -0
  163. package/src/lib/guards/lib/_is-prim.d.ts +27 -0
  164. package/src/lib/guards/lib/_is-prim.js +35 -0
  165. package/src/lib/guards/lib/_is-prim.js.map +1 -0
  166. package/src/lib/guards/lib/_is-promise-like.d.ts +24 -0
  167. package/src/lib/guards/lib/_is-promise-like.js +28 -0
  168. package/src/lib/guards/lib/_is-promise-like.js.map +1 -0
  169. package/src/lib/guards/lib/_is-str-empty.d.ts +25 -0
  170. package/src/lib/guards/lib/_is-str-empty.js +28 -0
  171. package/src/lib/guards/lib/_is-str-empty.js.map +1 -0
  172. package/src/lib/guards/lib/_is-str-t.d.ts +26 -0
  173. package/src/lib/guards/lib/_is-str-t.js +28 -0
  174. package/src/lib/guards/lib/_is-str-t.js.map +1 -0
  175. package/src/lib/guards/lib/_is-sym-t.d.ts +25 -0
  176. package/src/lib/guards/lib/_is-sym-t.js +27 -0
  177. package/src/lib/guards/lib/_is-sym-t.js.map +1 -0
  178. package/src/lib/guards/lib/_is-und-or-null.d.ts +25 -0
  179. package/src/lib/guards/lib/_is-und-or-null.js +29 -0
  180. package/src/lib/guards/lib/_is-und-or-null.js.map +1 -0
  181. package/src/lib/guards/lib/_is-und-t.d.ts +25 -0
  182. package/src/lib/guards/lib/_is-und-t.js +27 -0
  183. package/src/lib/guards/lib/_is-und-t.js.map +1 -0
  184. package/src/lib/interop-default.d.ts +18 -0
  185. package/src/lib/interop-default.js +21 -0
  186. package/src/lib/interop-default.js.map +1 -0
  187. package/src/lib/length.d.ts +22 -0
  188. package/src/lib/length.js +28 -0
  189. package/src/lib/length.js.map +1 -0
  190. package/src/lib/linear-regex.d.ts +136 -0
  191. package/src/lib/linear-regex.js +1140 -0
  192. package/src/lib/linear-regex.js.map +1 -0
  193. package/src/lib/no-side-effects.d.ts +29 -0
  194. package/src/lib/no-side-effects.js +33 -0
  195. package/src/lib/no-side-effects.js.map +1 -0
  196. package/src/lib/noop.d.ts +21 -0
  197. package/src/lib/noop.js +22 -0
  198. package/src/lib/noop.js.map +1 -0
  199. package/src/lib/normalized.d.ts +164 -0
  200. package/src/lib/normalized.js +232 -0
  201. package/src/lib/normalized.js.map +1 -0
  202. package/src/lib/number/number-from-hexadecimal.d.ts +24 -0
  203. package/src/lib/number/number-from-hexadecimal.js +29 -0
  204. package/src/lib/number/number-from-hexadecimal.js.map +1 -0
  205. package/src/lib/number/number-to-hexadecimal.d.ts +22 -0
  206. package/src/lib/number/number-to-hexadecimal.js +24 -0
  207. package/src/lib/number/number-to-hexadecimal.js.map +1 -0
  208. package/src/lib/number/to-num.d.ts +41 -0
  209. package/src/lib/number/to-num.js +41 -0
  210. package/src/lib/number/to-num.js.map +1 -0
  211. package/src/lib/numeronym.d.ts +41 -0
  212. package/src/lib/numeronym.js +54 -0
  213. package/src/lib/numeronym.js.map +1 -0
  214. package/src/lib/object/object-clone-deep.d.ts +21 -0
  215. package/src/lib/object/object-clone-deep.js +24 -0
  216. package/src/lib/object/object-clone-deep.js.map +1 -0
  217. package/src/lib/object/object-clone.d.ts +21 -0
  218. package/src/lib/object/object-clone.js +24 -0
  219. package/src/lib/object/object-clone.js.map +1 -0
  220. package/src/lib/object/object-delete-property.d.ts +28 -0
  221. package/src/lib/object/object-delete-property.js +32 -0
  222. package/src/lib/object/object-delete-property.js.map +1 -0
  223. package/src/lib/object/object-get-deep-property.d.ts +35 -0
  224. package/src/lib/object/object-get-deep-property.js +40 -0
  225. package/src/lib/object/object-get-deep-property.js.map +1 -0
  226. package/src/lib/object/object-get-keys-and-symbol-properties.d.ts +23 -0
  227. package/src/lib/object/object-get-keys-and-symbol-properties.js +30 -0
  228. package/src/lib/object/object-get-keys-and-symbol-properties.js.map +1 -0
  229. package/src/lib/object/object-remap.d.ts +33 -0
  230. package/src/lib/object/object-remap.js +36 -0
  231. package/src/lib/object/object-remap.js.map +1 -0
  232. package/src/lib/object/object-safe.d.ts +27 -0
  233. package/src/lib/object/object-safe.js +30 -0
  234. package/src/lib/object/object-safe.js.map +1 -0
  235. package/src/lib/object/object-set-deep-property.d.ts +35 -0
  236. package/src/lib/object/object-set-deep-property.js +44 -0
  237. package/src/lib/object/object-set-deep-property.js.map +1 -0
  238. package/src/lib/object/object-update.d.ts +28 -0
  239. package/src/lib/object/object-update.js +32 -0
  240. package/src/lib/object/object-update.js.map +1 -0
  241. package/src/lib/operator/compare.d.ts +26 -0
  242. package/src/lib/operator/compare.js +42 -0
  243. package/src/lib/operator/compare.js.map +1 -0
  244. package/src/lib/operator/definitions.d.ts +184 -0
  245. package/src/lib/operator/definitions.js +110 -0
  246. package/src/lib/operator/definitions.js.map +1 -0
  247. package/src/lib/operator/index.d.ts +19 -0
  248. package/src/lib/operator/index.js +20 -0
  249. package/src/lib/operator/index.js.map +1 -0
  250. package/src/lib/operator/inference.d.ts +66 -0
  251. package/src/lib/operator/inference.js +60 -0
  252. package/src/lib/operator/inference.js.map +1 -0
  253. package/src/lib/secret-box.d.ts +152 -0
  254. package/src/lib/secret-box.js +263 -0
  255. package/src/lib/secret-box.js.map +1 -0
  256. package/src/lib/serialize/base64-isomorphic-decode.d.ts +23 -0
  257. package/src/lib/serialize/base64-isomorphic-decode.js +28 -0
  258. package/src/lib/serialize/base64-isomorphic-decode.js.map +1 -0
  259. package/src/lib/serialize/base64-isomorphic-encode.d.ts +23 -0
  260. package/src/lib/serialize/base64-isomorphic-encode.js +28 -0
  261. package/src/lib/serialize/base64-isomorphic-encode.js.map +1 -0
  262. package/src/lib/serialize/json-deserialize.d.ts +25 -0
  263. package/src/lib/serialize/json-deserialize.js +27 -0
  264. package/src/lib/serialize/json-deserialize.js.map +1 -0
  265. package/src/lib/serialize/json-serialize.d.ts +25 -0
  266. package/src/lib/serialize/json-serialize.js +27 -0
  267. package/src/lib/serialize/json-serialize.js.map +1 -0
  268. package/src/lib/serialize/php-serial-deserialize-from-byte-stream.d.ts +77 -0
  269. package/src/lib/serialize/php-serial-deserialize-from-byte-stream.js +77 -0
  270. package/src/lib/serialize/php-serial-deserialize-from-byte-stream.js.map +1 -0
  271. package/src/lib/serialize/php-serial-is-serialized-byte-stream.d.ts +77 -0
  272. package/src/lib/serialize/php-serial-is-serialized-byte-stream.js +77 -0
  273. package/src/lib/serialize/php-serial-is-serialized-byte-stream.js.map +1 -0
  274. package/src/lib/serialize/php-serial-serialize-to-byte-stream.d.ts +77 -0
  275. package/src/lib/serialize/php-serial-serialize-to-byte-stream.js +77 -0
  276. package/src/lib/serialize/php-serial-serialize-to-byte-stream.js.map +1 -0
  277. package/src/lib/split-display-name.d.ts +36 -0
  278. package/src/lib/split-display-name.js +47 -0
  279. package/src/lib/split-display-name.js.map +1 -0
  280. package/src/lib/str.d.ts +21 -0
  281. package/src/lib/str.js +23 -0
  282. package/src/lib/str.js.map +1 -0
  283. package/src/lib/trim.d.ts +25 -0
  284. package/src/lib/trim.js +28 -0
  285. package/src/lib/trim.js.map +1 -0
  286. package/src/lib/truthy.d.ts +23 -0
  287. package/src/lib/truthy.js +30 -0
  288. package/src/lib/truthy.js.map +1 -0
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ export declare enum Equality {
18
+ STRICT = "strict",
19
+ LOOSE = "loose",
20
+ DEFAULT = "strict"
21
+ }
22
+ export declare function _isEqualitySameType<T, U extends T>(value: T, options: {
23
+ truthiness?: Equality;
24
+ } | null, ...possibilities: U[]): value is U;
25
+ export default _isEqualitySameType;
@@ -0,0 +1,33 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */ export var Equality = /*#__PURE__*/ function(Equality) {
17
+ Equality["STRICT"] = "strict";
18
+ Equality["LOOSE"] = "loose";
19
+ Equality["DEFAULT"] = "strict";
20
+ return Equality;
21
+ }({});
22
+ export function _isEqualitySameType(value, options, ...possibilities) {
23
+ for (const possibility of possibilities){
24
+ if ((options == null ? void 0 : options.truthiness) === "loose") {
25
+ // noinspection EqualityComparisonWithCoercionJS
26
+ if (possibility == value) return true;
27
+ } else if (possibility === value) return true;
28
+ }
29
+ return false;
30
+ }
31
+ export default _isEqualitySameType;
32
+
33
+ //# sourceMappingURL=_is-equality-same-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../../libs/shared/util/tools/src/lib/guards/lib/_is-equality-same-type.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2023 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport enum Equality {\n STRICT = 'strict',\n LOOSE = 'loose',\n DEFAULT = STRICT,\n}\n\nexport function _isEqualitySameType<T, U extends T>(\n value: T,\n options: { truthiness?: Equality } | null,\n ...possibilities: U[]\n): value is U {\n for (const possibility of possibilities) {\n if (options?.truthiness === Equality.LOOSE) {\n // noinspection EqualityComparisonWithCoercionJS\n if (possibility == value) return true\n } else if (possibility === value) return true\n }\n return false\n}\nexport default _isEqualitySameType\n"],"names":["Equality","_isEqualitySameType","value","options","possibilities","possibility","truthiness"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,OAAO,IAAA,AAAKA,kCAAAA;;;;WAAAA;MAIX;AAED,OAAO,SAASC,oBACdC,KAAQ,EACRC,OAAyC,EACzC,GAAGC,aAAkB;IAErB,KAAK,MAAMC,eAAeD,cAAe;QACvC,IAAID,CAAAA,2BAAAA,QAASG,UAAU,eAAqB;YAC1C,gDAAgD;YAChD,IAAID,eAAeH,OAAO,OAAO;QACnC,OAAO,IAAIG,gBAAgBH,OAAO,OAAO;IAC3C;IACA,OAAO;AACT;AACA,eAAeD,oBAAmB"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2021 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ /**
18
+ * Is literal type function
19
+ *
20
+ * @export
21
+ * @param {*} val
22
+ * @returns {val is Function}
23
+ */
24
+ export declare function _isFnT(val: unknown): val is (...args: unknown[]) => unknown;
25
+ export default _isFnT;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2021 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */ /**
17
+ * Is literal type function
18
+ *
19
+ * @export
20
+ * @param {*} val
21
+ * @returns {val is Function}
22
+ */ export function _isFnT(val) {
23
+ return typeof val === 'function';
24
+ }
25
+ export default _isFnT;
26
+
27
+ //# sourceMappingURL=_is-fn-t.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../../libs/shared/util/tools/src/lib/guards/lib/_is-fn-t.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Is literal type function\n *\n * @export\n * @param {*} val\n * @returns {val is Function}\n */\nexport function _isFnT(val: unknown): val is (...args: unknown[]) => unknown {\n return typeof val === 'function'\n}\nexport default _isFnT\n"],"names":["_isFnT","val"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;;CAMC,GACD,OAAO,SAASA,OAAOC,GAAY;IACjC,OAAO,OAAOA,QAAQ;AACxB;AACA,eAAeD,OAAM"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2021 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ export type HasLenOpt<U> = {
18
+ equalTo?: number | undefined;
19
+ lessThan?: number | undefined;
20
+ moreThan?: number | undefined;
21
+ and?: true | undefined;
22
+ also?: ((length: number, value?: U) => boolean) | undefined;
23
+ };
24
+ /**
25
+ * Verify the value has a length or value greater than 0 by default
26
+ *
27
+ * TODO: Document better... And refactor/cleanup.. Maybe just do away with
28
+ * the combination and separate out all, probably best
29
+ *
30
+ * Options:
31
+ * (equalTo) - val must equal to it otherwise false
32
+ * (lessThan) - val must be less than then it
33
+ * (moreThan) - val must be greater than it
34
+ * (lessThan & moreThan) - val must be between the two
35
+ * (also) - provide an additional validator
36
+ * (and) - provide any boolean value that may require true
37
+ *
38
+ * @export
39
+ * @template T
40
+ * @template U
41
+ * @param {T} val
42
+ * @param {HasLenOpt<U>} opts
43
+ * @returns {boolean}
44
+ */
45
+ export declare function _isLengthOf<T extends Iterable<U> | ArrayLike<U> | number, U>(val: T, opts?: HasLenOpt<U>): boolean;
46
+ export declare function _isLengthOf<T extends Iterable<U> | ArrayLike<U> | number, U>(val: T, equalTo: number): boolean;
47
+ export default _isLengthOf;
@@ -0,0 +1,49 @@
1
+ import { _ as _extends } from "@swc/helpers/_/_extends";
2
+ /**
3
+ * @license
4
+ * Copyright 2021 Aglyn LLC
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */ import { _isFnT } from "./_is-fn-t.js";
18
+ import { _isNum } from "./_is-num.js";
19
+ import { _isNumPos } from "./_is-num-pos.js";
20
+ import { _isObj } from "./_is-obj.js";
21
+ export function _isLengthOf(val, opts) {
22
+ const _opts = !opts || _isObj(opts) ? _extends({}, opts) : {
23
+ equalTo: opts
24
+ };
25
+ const { equalTo, lessThan, moreThan, and, also } = _opts != null ? _opts : {};
26
+ const v = _isNum(val) ? Number(val) : val;
27
+ const len = _isNum(v) ? v : v.length;
28
+ const e = equalTo;
29
+ const l = lessThan;
30
+ const m = moreThan;
31
+ const et = _isNum(e);
32
+ const lt = _isNum(l);
33
+ const mt = _isNum(m);
34
+ const noOpt = !et && !lt && !mt;
35
+ const chkFunc = (firstCheck)=>{
36
+ if (_isFnT(also)) {
37
+ return Boolean(and ? firstCheck && also(len, v) : firstCheck || also(len, v));
38
+ }
39
+ // !opts && console.log('has len', val, len, _isNumPos(len))
40
+ return firstCheck;
41
+ };
42
+ const chkOpt = (equal, less, more, chk)=>{
43
+ return et === equal && lt === less && mt === more && chkFunc(chk);
44
+ };
45
+ return Boolean(noOpt ? chkFunc(_isNumPos(len)) : chkOpt(true, false, false, len === e) || chkOpt(false, true, false, len < l) || chkOpt(false, false, true, len > m) || chkOpt(false, true, true, and ? len < l && len > m : len < l || len > m) || chkOpt(true, true, false, and ? len === e && len < l : len === e || len < l) || chkOpt(true, false, true, and ? len === e && len > m : len === e || len > m) || chkOpt(true, true, true, and ? len === e && len < l && len > m : len === e || len < l || len > m));
46
+ }
47
+ export default _isLengthOf;
48
+
49
+ //# sourceMappingURL=_is-length-of.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../../libs/shared/util/tools/src/lib/guards/lib/_is-length-of.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { _isFnT } from './_is-fn-t'\nimport { _isNum } from './_is-num'\nimport { _isNumPos } from './_is-num-pos'\nimport { _isObj } from './_is-obj'\n\nexport type HasLenOpt<U> = {\n equalTo?: number | undefined\n lessThan?: number | undefined\n moreThan?: number | undefined\n and?: true | undefined\n also?: ((length: number, value?: U) => boolean) | undefined\n}\n\n/**\n * Verify the value has a length or value greater than 0 by default\n *\n * TODO: Document better... And refactor/cleanup.. Maybe just do away with\n * the combination and separate out all, probably best\n *\n * Options:\n * (equalTo) - val must equal to it otherwise false\n * (lessThan) - val must be less than then it\n * (moreThan) - val must be greater than it\n * (lessThan & moreThan) - val must be between the two\n * (also) - provide an additional validator\n * (and) - provide any boolean value that may require true\n *\n * @export\n * @template T\n * @template U\n * @param {T} val\n * @param {HasLenOpt<U>} opts\n * @returns {boolean}\n */\nexport function _isLengthOf<T extends Iterable<U> | ArrayLike<U> | number, U>(\n val: T,\n opts?: HasLenOpt<U>,\n): boolean\nexport function _isLengthOf<T extends Iterable<U> | ArrayLike<U> | number, U>(\n val: T,\n equalTo: number,\n): boolean\nexport function _isLengthOf<T extends Iterable<U> | ArrayLike<U> | number, U>(\n val: T,\n opts: any,\n): boolean {\n const _opts = !opts || _isObj(opts) ? { ...opts } : { equalTo: opts }\n const { equalTo, lessThan, moreThan, and, also } = _opts ?? {}\n const v = _isNum(val)\n ? Number(val)\n : (val as unknown as Iterable<T> | ArrayLike<T>)\n const len: number = _isNum(v) ? v : (v as any).length\n const e = equalTo\n const l = lessThan\n const m = moreThan\n const et = _isNum(e)\n const lt = _isNum(l)\n const mt = _isNum(m)\n const noOpt = !et && !lt && !mt\n const chkFunc = (firstCheck: boolean): boolean => {\n if (_isFnT(also)) {\n return Boolean(\n and ? firstCheck && also(len, v) : firstCheck || also(len, v),\n )\n }\n // !opts && console.log('has len', val, len, _isNumPos(len))\n return firstCheck\n }\n const chkOpt = (\n equal: boolean,\n less: boolean,\n more: boolean,\n chk: boolean,\n ): boolean => {\n return et === equal && lt === less && mt === more && chkFunc(chk)\n }\n return Boolean(\n noOpt\n ? chkFunc(_isNumPos(len))\n : chkOpt(true, false, false, len === e) ||\n chkOpt(false, true, false, len < l) ||\n chkOpt(false, false, true, len > m) ||\n chkOpt(\n false,\n true,\n true,\n and ? len < l && len > m : len < l || len > m,\n ) ||\n chkOpt(\n true,\n true,\n false,\n and ? len === e && len < l : len === e || len < l,\n ) ||\n chkOpt(\n true,\n false,\n true,\n and ? len === e && len > m : len === e || len > m,\n ) ||\n chkOpt(\n true,\n true,\n true,\n and\n ? len === e && len < l && len > m\n : len === e || len < l || len > m,\n ),\n )\n}\nexport default _isLengthOf\n"],"names":["_isFnT","_isNum","_isNumPos","_isObj","_isLengthOf","val","opts","_opts","equalTo","lessThan","moreThan","and","also","v","Number","len","length","e","l","m","et","lt","mt","noOpt","chkFunc","firstCheck","Boolean","chkOpt","equal","less","more","chk"],"mappings":";AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,MAAM,QAAQ,gBAAY;AACnC,SAASC,MAAM,QAAQ,eAAW;AAClC,SAASC,SAAS,QAAQ,mBAAe;AACzC,SAASC,MAAM,QAAQ,eAAW;AAuClC,OAAO,SAASC,YACdC,GAAM,EACNC,IAAS;IAET,MAAMC,QAAQ,CAACD,QAAQH,OAAOG,QAAQ,aAAKA,QAAS;QAAEE,SAASF;IAAK;IACpE,MAAM,EAAEE,OAAO,EAAEC,QAAQ,EAAEC,QAAQ,EAAEC,GAAG,EAAEC,IAAI,EAAE,GAAGL,gBAAAA,QAAS,CAAC;IAC7D,MAAMM,IAAIZ,OAAOI,OACbS,OAAOT,OACNA;IACL,MAAMU,MAAcd,OAAOY,KAAKA,IAAI,AAACA,EAAUG,MAAM;IACrD,MAAMC,IAAIT;IACV,MAAMU,IAAIT;IACV,MAAMU,IAAIT;IACV,MAAMU,KAAKnB,OAAOgB;IAClB,MAAMI,KAAKpB,OAAOiB;IAClB,MAAMI,KAAKrB,OAAOkB;IAClB,MAAMI,QAAQ,CAACH,MAAM,CAACC,MAAM,CAACC;IAC7B,MAAME,UAAU,CAACC;QACf,IAAIzB,OAAOY,OAAO;YAChB,OAAOc,QACLf,MAAMc,cAAcb,KAAKG,KAAKF,KAAKY,cAAcb,KAAKG,KAAKF;QAE/D;QACA,4DAA4D;QAC5D,OAAOY;IACT;IACA,MAAME,SAAS,CACbC,OACAC,MACAC,MACAC;QAEA,OAAOX,OAAOQ,SAASP,OAAOQ,QAAQP,OAAOQ,QAAQN,QAAQO;IAC/D;IACA,OAAOL,QACLH,QACIC,QAAQtB,UAAUa,QAClBY,OAAO,MAAM,OAAO,OAAOZ,QAAQE,MACjCU,OAAO,OAAO,MAAM,OAAOZ,MAAMG,MACjCS,OAAO,OAAO,OAAO,MAAMZ,MAAMI,MACjCQ,OACE,OACA,MACA,MACAhB,MAAMI,MAAMG,KAAKH,MAAMI,IAAIJ,MAAMG,KAAKH,MAAMI,MAE9CQ,OACE,MACA,MACA,OACAhB,MAAMI,QAAQE,KAAKF,MAAMG,IAAIH,QAAQE,KAAKF,MAAMG,MAElDS,OACE,MACA,OACA,MACAhB,MAAMI,QAAQE,KAAKF,MAAMI,IAAIJ,QAAQE,KAAKF,MAAMI,MAElDQ,OACE,MACA,MACA,MACAhB,MACII,QAAQE,KAAKF,MAAMG,KAAKH,MAAMI,IAC9BJ,QAAQE,KAAKF,MAAMG,KAAKH,MAAMI;AAG9C;AACA,eAAef,YAAW"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { type ComparisonOperator } from '../../operator';
18
+ /**
19
+ * Checks if the parameter has length greater than 0 or second parameter
20
+ * @param leftOperand
21
+ * @param rightOperand
22
+ * @param operator
23
+ */
24
+ export declare function _isLength<T>(leftOperand: Iterable<T> | ArrayLike<T> | number, rightOperand: Iterable<T> | ArrayLike<T> | number, operator?: ComparisonOperator): boolean;
25
+ export default _isLength;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */ import { compare } from "../../operator/index.js";
17
+ import { _isNum } from "./_is-num.js";
18
+ /**
19
+ * Checks if the parameter has length greater than 0 or second parameter
20
+ * @param leftOperand
21
+ * @param rightOperand
22
+ * @param operator
23
+ */ export function _isLength(leftOperand, rightOperand, operator = '===') {
24
+ if (typeof leftOperand !== 'undefined') {
25
+ var _leftOperand_length, _rightOperand_length;
26
+ const left = _isNum(leftOperand) ? leftOperand : (_leftOperand_length = leftOperand['length']) != null ? _leftOperand_length : 0;
27
+ const right = _isNum(rightOperand) ? rightOperand : (_rightOperand_length = rightOperand['length']) != null ? _rightOperand_length : 0;
28
+ return compare(left, right, operator);
29
+ }
30
+ return false;
31
+ }
32
+ export default _isLength;
33
+
34
+ //# sourceMappingURL=_is-length.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../../libs/shared/util/tools/src/lib/guards/lib/_is-length.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { compare, type ComparisonOperator } from '../../operator'\nimport { _isNum } from './_is-num'\n\n\n/**\n * Checks if the parameter has length greater than 0 or second parameter\n * @param leftOperand\n * @param rightOperand\n * @param operator\n */\nexport function _isLength<T>(\n leftOperand: Iterable<T> | ArrayLike<T> | number,\n rightOperand: Iterable<T> | ArrayLike<T> | number,\n operator: ComparisonOperator = '===',\n): boolean {\n if (typeof leftOperand !== 'undefined') {\n const left = _isNum(leftOperand) ? leftOperand : (leftOperand as any)['length'] ?? 0\n const right = _isNum(rightOperand)\n ? rightOperand\n : (rightOperand as any)['length'] ?? 0\n return compare(left, right, operator)\n }\n return false\n}\n\nexport default _isLength\n"],"names":["compare","_isNum","_isLength","leftOperand","rightOperand","operator","left","right"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,OAAO,QAAiC,0BAAgB;AACjE,SAASC,MAAM,QAAQ,eAAW;AAGlC;;;;;CAKC,GACD,OAAO,SAASC,UACdC,WAAgD,EAChDC,YAAiD,EACjDC,WAA+B,KAAK;IAEpC,IAAI,OAAOF,gBAAgB,aAAa;YACW,qBAG7C;QAHJ,MAAMG,OAAOL,OAAOE,eAAeA,eAAc,sBAAA,AAACA,WAAmB,CAAC,SAAS,YAA9B,sBAAkC;QACnF,MAAMI,QAAQN,OAAOG,gBACjBA,gBACA,uBAAA,AAACA,YAAoB,CAAC,SAAS,YAA/B,uBAAmC;QACvC,OAAOJ,QAAQM,MAAMC,OAAOF;IAC9B;IACA,OAAO;AACT;AAEA,eAAeH,UAAS"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ /**
18
+ * Check if a value is of primitive `null` literal type. The `typeof value`
19
+ * value on a `null` literal will equal a string equal to `'object'`.
20
+ * @example
21
+ * // Shortcuts the following equality checks
22
+ * value === null && typeof value === 'object'
23
+ */
24
+ export declare function _isNull(value: unknown): value is null;
25
+ export default _isNull;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */ /**
17
+ * Check if a value is of primitive `null` literal type. The `typeof value`
18
+ * value on a `null` literal will equal a string equal to `'object'`.
19
+ * @example
20
+ * // Shortcuts the following equality checks
21
+ * value === null && typeof value === 'object'
22
+ */ export function _isNull(value) {
23
+ return value === null && typeof value === 'object';
24
+ }
25
+ export default _isNull;
26
+
27
+ //# sourceMappingURL=_is-null.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../../libs/shared/util/tools/src/lib/guards/lib/_is-null.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2022 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Check if a value is of primitive `null` literal type. The `typeof value`\n * value on a `null` literal will equal a string equal to `'object'`.\n * @example\n * // Shortcuts the following equality checks\n * value === null && typeof value === 'object'\n */\nexport function _isNull(value: unknown): value is null {\n return value === null && typeof value === 'object'\n}\nexport default _isNull\n"],"names":["_isNull","value"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;;CAMC,GACD,OAAO,SAASA,QAAQC,KAAc;IACpC,OAAOA,UAAU,QAAQ,OAAOA,UAAU;AAC5C;AACA,eAAeD,QAAO"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2021 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ /**
18
+ * Checks if the value is a negative number
19
+ *
20
+ * @export
21
+ * @param {*} val
22
+ * @returns {(val is number & boolean)}
23
+ */
24
+ export declare function _isNumNeg(val: unknown): val is number & boolean;
25
+ export default _isNumNeg;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2021 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */ import { _isNum } from "./_is-num.js";
17
+ /**
18
+ * Checks if the value is a negative number
19
+ *
20
+ * @export
21
+ * @param {*} val
22
+ * @returns {(val is number & boolean)}
23
+ */ export function _isNumNeg(val) {
24
+ return _isNum(val) && Number(val) < 0;
25
+ }
26
+ export default _isNumNeg;
27
+
28
+ //# sourceMappingURL=_is-num-neg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../../libs/shared/util/tools/src/lib/guards/lib/_is-num-neg.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { _isNum } from './_is-num'\n\n/**\n * Checks if the value is a negative number\n *\n * @export\n * @param {*} val\n * @returns {(val is number & boolean)}\n */\nexport function _isNumNeg(val: unknown): val is number & boolean {\n return _isNum(val) && Number(val) < 0\n}\nexport default _isNumNeg\n"],"names":["_isNum","_isNumNeg","val","Number"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,MAAM,QAAQ,eAAW;AAElC;;;;;;CAMC,GACD,OAAO,SAASC,UAAUC,GAAY;IACpC,OAAOF,OAAOE,QAAQC,OAAOD,OAAO;AACtC;AACA,eAAeD,UAAS"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2021 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ /**
18
+ * Checks if the value is a positive number
19
+ *
20
+ * @export
21
+ * @param {*} val
22
+ * @returns {(val is number & boolean)}
23
+ */
24
+ export declare function _isNumPos(val: unknown): val is number & boolean;
25
+ export default _isNumPos;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2021 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */ import { _isNum } from "./_is-num.js";
17
+ /**
18
+ * Checks if the value is a positive number
19
+ *
20
+ * @export
21
+ * @param {*} val
22
+ * @returns {(val is number & boolean)}
23
+ */ export function _isNumPos(val) {
24
+ return _isNum(val) && Number(val) > 0;
25
+ }
26
+ export default _isNumPos;
27
+
28
+ //# sourceMappingURL=_is-num-pos.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../../libs/shared/util/tools/src/lib/guards/lib/_is-num-pos.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { _isNum } from './_is-num'\n\n/**\n * Checks if the value is a positive number\n *\n * @export\n * @param {*} val\n * @returns {(val is number & boolean)}\n */\nexport function _isNumPos(val: unknown): val is number & boolean {\n return _isNum(val) && Number(val) > 0\n}\nexport default _isNumPos\n"],"names":["_isNum","_isNumPos","val","Number"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,MAAM,QAAQ,eAAW;AAElC;;;;;;CAMC,GACD,OAAO,SAASC,UAAUC,GAAY;IACpC,OAAOF,OAAOE,QAAQC,OAAOD,OAAO;AACtC;AACA,eAAeD,UAAS"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2021 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ /**
18
+ * Is literal type 'number'
19
+ *
20
+ * @export
21
+ * @param {*} val
22
+ * @returns {val is number}
23
+ */
24
+ export declare function _isNumT(val: unknown): val is number;
25
+ export default _isNumT;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2021 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */ /**
17
+ * Is literal type 'number'
18
+ *
19
+ * @export
20
+ * @param {*} val
21
+ * @returns {val is number}
22
+ */ export function _isNumT(val) {
23
+ return typeof val === 'number';
24
+ }
25
+ export default _isNumT;
26
+
27
+ //# sourceMappingURL=_is-num-t.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../../libs/shared/util/tools/src/lib/guards/lib/_is-num-t.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Is literal type 'number'\n *\n * @export\n * @param {*} val\n * @returns {val is number}\n */\nexport function _isNumT(val: unknown): val is number {\n return typeof val === 'number'\n}\nexport default _isNumT\n"],"names":["_isNumT","val"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;;CAMC,GACD,OAAO,SAASA,QAAQC,GAAY;IAClC,OAAO,OAAOA,QAAQ;AACxB;AACA,eAAeD,QAAO"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2021 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ /**
18
+ * Checks if the value is a number equal to zero(0)
19
+ *
20
+ * @export
21
+ * @param {*} val
22
+ * @returns {val is 0}
23
+ */
24
+ export declare function _isNumZero(val: unknown): val is 0;
25
+ export default _isNumZero;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2021 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */ import { _isNum } from "./_is-num.js";
17
+ /**
18
+ * Checks if the value is a number equal to zero(0)
19
+ *
20
+ * @export
21
+ * @param {*} val
22
+ * @returns {val is 0}
23
+ */ export function _isNumZero(val) {
24
+ return _isNum(val) && Number(val) === 0;
25
+ }
26
+ export default _isNumZero;
27
+
28
+ //# sourceMappingURL=_is-num-zero.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../../libs/shared/util/tools/src/lib/guards/lib/_is-num-zero.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { _isNum } from './_is-num'\n\n/**\n * Checks if the value is a number equal to zero(0)\n *\n * @export\n * @param {*} val\n * @returns {val is 0}\n */\nexport function _isNumZero(val: unknown): val is 0 {\n return _isNum(val) && Number(val) === 0\n}\nexport default _isNumZero\n"],"names":["_isNum","_isNumZero","val","Number"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,MAAM,QAAQ,eAAW;AAElC;;;;;;CAMC,GACD,OAAO,SAASC,WAAWC,GAAY;IACrC,OAAOF,OAAOE,QAAQC,OAAOD,SAAS;AACxC;AACA,eAAeD,WAAU"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2021 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ /**
18
+ * Is value a number, allows even if string (e.g. "6" vs 6)
19
+ *
20
+ * @export
21
+ * @param {*} val
22
+ * @param {boolean} [noStr]
23
+ * @returns {val is number}
24
+ */
25
+ export declare function _isNum(val: unknown, noStr?: boolean): val is number;
26
+ export default _isNum;