@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.
- package/LICENSE +201 -0
- package/README.md +7 -0
- package/package.json +39 -0
- package/src/index.d.ts +72 -0
- package/src/index.js +87 -0
- package/src/index.js.map +1 -0
- package/src/lib/apply-mixins.d.ts +24 -0
- package/src/lib/apply-mixins.js +31 -0
- package/src/lib/apply-mixins.js.map +1 -0
- package/src/lib/array/array-copy-deep.d.ts +6 -0
- package/src/lib/array/array-copy-deep.js +25 -0
- package/src/lib/array/array-copy-deep.js.map +1 -0
- package/src/lib/array/array-copy-shallow.d.ts +19 -0
- package/src/lib/array/array-copy-shallow.js +20 -0
- package/src/lib/array/array-copy-shallow.js.map +1 -0
- package/src/lib/array/array-from-length.d.ts +18 -0
- package/src/lib/array/array-from-length.js +23 -0
- package/src/lib/array/array-from-length.js.map +1 -0
- package/src/lib/array/array-from.d.ts +24 -0
- package/src/lib/array/array-from.js +26 -0
- package/src/lib/array/array-from.js.map +1 -0
- package/src/lib/array/array-move-at-index.d.ts +24 -0
- package/src/lib/array/array-move-at-index.js +32 -0
- package/src/lib/array/array-move-at-index.js.map +1 -0
- package/src/lib/array/array-of-entries-to-object.d.ts +23 -0
- package/src/lib/array/array-of-entries-to-object.js +26 -0
- package/src/lib/array/array-of-entries-to-object.js.map +1 -0
- package/src/lib/array/array-overrides.d.ts +29 -0
- package/src/lib/array/array-overrides.js +71 -0
- package/src/lib/array/array-overrides.js.map +1 -0
- package/src/lib/array/array-push-at-index.d.ts +28 -0
- package/src/lib/array/array-push-at-index.js +32 -0
- package/src/lib/array/array-push-at-index.js.map +1 -0
- package/src/lib/array/array-remove-at-index.d.ts +23 -0
- package/src/lib/array/array-remove-at-index.js +26 -0
- package/src/lib/array/array-remove-at-index.js.map +1 -0
- package/src/lib/array/array-remove-item.d.ts +23 -0
- package/src/lib/array/array-remove-item.js +27 -0
- package/src/lib/array/array-remove-item.js.map +1 -0
- package/src/lib/array/array-safe.d.ts +21 -0
- package/src/lib/array/array-safe.js +29 -0
- package/src/lib/array/array-safe.js.map +1 -0
- package/src/lib/array/array-sort-by-deep-property.d.ts +26 -0
- package/src/lib/array/array-sort-by-deep-property.js +39 -0
- package/src/lib/array/array-sort-by-deep-property.js.map +1 -0
- package/src/lib/array/array-sort-by.d.ts +26 -0
- package/src/lib/array/array-sort-by.js +36 -0
- package/src/lib/array/array-sort-by.js.map +1 -0
- package/src/lib/array/array-update-at-index.d.ts +18 -0
- package/src/lib/array/array-update-at-index.js +22 -0
- package/src/lib/array/array-update-at-index.js.map +1 -0
- package/src/lib/array/array-update.d.ts +23 -0
- package/src/lib/array/array-update.js +25 -0
- package/src/lib/array/array-update.js.map +1 -0
- package/src/lib/bitwise/bitwise-has-all-attributes.d.ts +18 -0
- package/src/lib/bitwise/bitwise-has-all-attributes.js +21 -0
- package/src/lib/bitwise/bitwise-has-all-attributes.js.map +1 -0
- package/src/lib/bitwise/bitwise-has-attribute.d.ts +18 -0
- package/src/lib/bitwise/bitwise-has-attribute.js +21 -0
- package/src/lib/bitwise/bitwise-has-attribute.js.map +1 -0
- package/src/lib/bitwise/bitwise-has-only-attributes.d.ts +18 -0
- package/src/lib/bitwise/bitwise-has-only-attributes.js +21 -0
- package/src/lib/bitwise/bitwise-has-only-attributes.js.map +1 -0
- package/src/lib/contrast.d.ts +65 -0
- package/src/lib/contrast.js +78 -0
- package/src/lib/contrast.js.map +1 -0
- package/src/lib/copy-shallow.d.ts +19 -0
- package/src/lib/copy-shallow.js +20 -0
- package/src/lib/copy-shallow.js.map +1 -0
- package/src/lib/copy.d.ts +19 -0
- package/src/lib/copy.js +20 -0
- package/src/lib/copy.js.map +1 -0
- package/src/lib/create-chained-function.d.ts +38 -0
- package/src/lib/create-chained-function.js +46 -0
- package/src/lib/create-chained-function.js.map +1 -0
- package/src/lib/crud.d.ts +46 -0
- package/src/lib/crud.js +55 -0
- package/src/lib/crud.js.map +1 -0
- package/src/lib/css.d.ts +41 -0
- package/src/lib/css.js +54 -0
- package/src/lib/css.js.map +1 -0
- package/src/lib/escape-html.d.ts +38 -0
- package/src/lib/escape-html.js +47 -0
- package/src/lib/escape-html.js.map +1 -0
- package/src/lib/falsy.d.ts +23 -0
- package/src/lib/falsy.js +25 -0
- package/src/lib/falsy.js.map +1 -0
- package/src/lib/get-display-name.d.ts +46 -0
- package/src/lib/get-display-name.js +64 -0
- package/src/lib/get-display-name.js.map +1 -0
- package/src/lib/get-property.d.ts +30 -0
- package/src/lib/get-property.js +36 -0
- package/src/lib/get-property.js.map +1 -0
- package/src/lib/get-static-field.d.ts +23 -0
- package/src/lib/get-static-field.js +25 -0
- package/src/lib/get-static-field.js.map +1 -0
- package/src/lib/guards/index.d.ts +46 -0
- package/src/lib/guards/index.js +47 -0
- package/src/lib/guards/index.js.map +1 -0
- package/src/lib/guards/lib/_has-own-property.d.ts +24 -0
- package/src/lib/guards/lib/_has-own-property.js +27 -0
- package/src/lib/guards/lib/_has-own-property.js.map +1 -0
- package/src/lib/guards/lib/_is-arr-empty.d.ts +23 -0
- package/src/lib/guards/lib/_is-arr-empty.js +25 -0
- package/src/lib/guards/lib/_is-arr-empty.js.map +1 -0
- package/src/lib/guards/lib/_is-arr-of-arr.d.ts +25 -0
- package/src/lib/guards/lib/_is-arr-of-arr.js +31 -0
- package/src/lib/guards/lib/_is-arr-of-arr.js.map +1 -0
- package/src/lib/guards/lib/_is-arr.d.ts +21 -0
- package/src/lib/guards/lib/_is-arr.js +23 -0
- package/src/lib/guards/lib/_is-arr.js.map +1 -0
- package/src/lib/guards/lib/_is-big.d.ts +25 -0
- package/src/lib/guards/lib/_is-big.js +27 -0
- package/src/lib/guards/lib/_is-big.js.map +1 -0
- package/src/lib/guards/lib/_is-bool.d.ts +25 -0
- package/src/lib/guards/lib/_is-bool.js +27 -0
- package/src/lib/guards/lib/_is-bool.js.map +1 -0
- package/src/lib/guards/lib/_is-buff.d.ts +25 -0
- package/src/lib/guards/lib/_is-buff.js +29 -0
- package/src/lib/guards/lib/_is-buff.js.map +1 -0
- package/src/lib/guards/lib/_is-ctor.d.ts +25 -0
- package/src/lib/guards/lib/_is-ctor.js +30 -0
- package/src/lib/guards/lib/_is-ctor.js.map +1 -0
- package/src/lib/guards/lib/_is-empty-str-or-arr.d.ts +25 -0
- package/src/lib/guards/lib/_is-empty-str-or-arr.js +29 -0
- package/src/lib/guards/lib/_is-empty-str-or-arr.js.map +1 -0
- package/src/lib/guards/lib/_is-equality-same-type.d.ts +25 -0
- package/src/lib/guards/lib/_is-equality-same-type.js +33 -0
- package/src/lib/guards/lib/_is-equality-same-type.js.map +1 -0
- package/src/lib/guards/lib/_is-fn-t.d.ts +25 -0
- package/src/lib/guards/lib/_is-fn-t.js +27 -0
- package/src/lib/guards/lib/_is-fn-t.js.map +1 -0
- package/src/lib/guards/lib/_is-length-of.d.ts +47 -0
- package/src/lib/guards/lib/_is-length-of.js +49 -0
- package/src/lib/guards/lib/_is-length-of.js.map +1 -0
- package/src/lib/guards/lib/_is-length.d.ts +25 -0
- package/src/lib/guards/lib/_is-length.js +34 -0
- package/src/lib/guards/lib/_is-length.js.map +1 -0
- package/src/lib/guards/lib/_is-null.d.ts +25 -0
- package/src/lib/guards/lib/_is-null.js +27 -0
- package/src/lib/guards/lib/_is-null.js.map +1 -0
- package/src/lib/guards/lib/_is-num-neg.d.ts +25 -0
- package/src/lib/guards/lib/_is-num-neg.js +28 -0
- package/src/lib/guards/lib/_is-num-neg.js.map +1 -0
- package/src/lib/guards/lib/_is-num-pos.d.ts +25 -0
- package/src/lib/guards/lib/_is-num-pos.js +28 -0
- package/src/lib/guards/lib/_is-num-pos.js.map +1 -0
- package/src/lib/guards/lib/_is-num-t.d.ts +25 -0
- package/src/lib/guards/lib/_is-num-t.js +27 -0
- package/src/lib/guards/lib/_is-num-t.js.map +1 -0
- package/src/lib/guards/lib/_is-num-zero.d.ts +25 -0
- package/src/lib/guards/lib/_is-num-zero.js +28 -0
- package/src/lib/guards/lib/_is-num-zero.js.map +1 -0
- package/src/lib/guards/lib/_is-num.d.ts +26 -0
- package/src/lib/guards/lib/_is-num.js +29 -0
- package/src/lib/guards/lib/_is-num.js.map +1 -0
- package/src/lib/guards/lib/_is-obj-t.d.ts +26 -0
- package/src/lib/guards/lib/_is-obj-t.js +28 -0
- package/src/lib/guards/lib/_is-obj-t.js.map +1 -0
- package/src/lib/guards/lib/_is-obj.d.ts +27 -0
- package/src/lib/guards/lib/_is-obj.js +32 -0
- package/src/lib/guards/lib/_is-obj.js.map +1 -0
- package/src/lib/guards/lib/_is-prim.d.ts +27 -0
- package/src/lib/guards/lib/_is-prim.js +35 -0
- package/src/lib/guards/lib/_is-prim.js.map +1 -0
- package/src/lib/guards/lib/_is-promise-like.d.ts +24 -0
- package/src/lib/guards/lib/_is-promise-like.js +28 -0
- package/src/lib/guards/lib/_is-promise-like.js.map +1 -0
- package/src/lib/guards/lib/_is-str-empty.d.ts +25 -0
- package/src/lib/guards/lib/_is-str-empty.js +28 -0
- package/src/lib/guards/lib/_is-str-empty.js.map +1 -0
- package/src/lib/guards/lib/_is-str-t.d.ts +26 -0
- package/src/lib/guards/lib/_is-str-t.js +28 -0
- package/src/lib/guards/lib/_is-str-t.js.map +1 -0
- package/src/lib/guards/lib/_is-sym-t.d.ts +25 -0
- package/src/lib/guards/lib/_is-sym-t.js +27 -0
- package/src/lib/guards/lib/_is-sym-t.js.map +1 -0
- package/src/lib/guards/lib/_is-und-or-null.d.ts +25 -0
- package/src/lib/guards/lib/_is-und-or-null.js +29 -0
- package/src/lib/guards/lib/_is-und-or-null.js.map +1 -0
- package/src/lib/guards/lib/_is-und-t.d.ts +25 -0
- package/src/lib/guards/lib/_is-und-t.js +27 -0
- package/src/lib/guards/lib/_is-und-t.js.map +1 -0
- package/src/lib/interop-default.d.ts +18 -0
- package/src/lib/interop-default.js +21 -0
- package/src/lib/interop-default.js.map +1 -0
- package/src/lib/length.d.ts +22 -0
- package/src/lib/length.js +28 -0
- package/src/lib/length.js.map +1 -0
- package/src/lib/linear-regex.d.ts +136 -0
- package/src/lib/linear-regex.js +1140 -0
- package/src/lib/linear-regex.js.map +1 -0
- package/src/lib/no-side-effects.d.ts +29 -0
- package/src/lib/no-side-effects.js +33 -0
- package/src/lib/no-side-effects.js.map +1 -0
- package/src/lib/noop.d.ts +21 -0
- package/src/lib/noop.js +22 -0
- package/src/lib/noop.js.map +1 -0
- package/src/lib/normalized.d.ts +164 -0
- package/src/lib/normalized.js +232 -0
- package/src/lib/normalized.js.map +1 -0
- package/src/lib/number/number-from-hexadecimal.d.ts +24 -0
- package/src/lib/number/number-from-hexadecimal.js +29 -0
- package/src/lib/number/number-from-hexadecimal.js.map +1 -0
- package/src/lib/number/number-to-hexadecimal.d.ts +22 -0
- package/src/lib/number/number-to-hexadecimal.js +24 -0
- package/src/lib/number/number-to-hexadecimal.js.map +1 -0
- package/src/lib/number/to-num.d.ts +41 -0
- package/src/lib/number/to-num.js +41 -0
- package/src/lib/number/to-num.js.map +1 -0
- package/src/lib/numeronym.d.ts +41 -0
- package/src/lib/numeronym.js +54 -0
- package/src/lib/numeronym.js.map +1 -0
- package/src/lib/object/object-clone-deep.d.ts +21 -0
- package/src/lib/object/object-clone-deep.js +24 -0
- package/src/lib/object/object-clone-deep.js.map +1 -0
- package/src/lib/object/object-clone.d.ts +21 -0
- package/src/lib/object/object-clone.js +24 -0
- package/src/lib/object/object-clone.js.map +1 -0
- package/src/lib/object/object-delete-property.d.ts +28 -0
- package/src/lib/object/object-delete-property.js +32 -0
- package/src/lib/object/object-delete-property.js.map +1 -0
- package/src/lib/object/object-get-deep-property.d.ts +35 -0
- package/src/lib/object/object-get-deep-property.js +40 -0
- package/src/lib/object/object-get-deep-property.js.map +1 -0
- package/src/lib/object/object-get-keys-and-symbol-properties.d.ts +23 -0
- package/src/lib/object/object-get-keys-and-symbol-properties.js +30 -0
- package/src/lib/object/object-get-keys-and-symbol-properties.js.map +1 -0
- package/src/lib/object/object-remap.d.ts +33 -0
- package/src/lib/object/object-remap.js +36 -0
- package/src/lib/object/object-remap.js.map +1 -0
- package/src/lib/object/object-safe.d.ts +27 -0
- package/src/lib/object/object-safe.js +30 -0
- package/src/lib/object/object-safe.js.map +1 -0
- package/src/lib/object/object-set-deep-property.d.ts +35 -0
- package/src/lib/object/object-set-deep-property.js +44 -0
- package/src/lib/object/object-set-deep-property.js.map +1 -0
- package/src/lib/object/object-update.d.ts +28 -0
- package/src/lib/object/object-update.js +32 -0
- package/src/lib/object/object-update.js.map +1 -0
- package/src/lib/operator/compare.d.ts +26 -0
- package/src/lib/operator/compare.js +42 -0
- package/src/lib/operator/compare.js.map +1 -0
- package/src/lib/operator/definitions.d.ts +184 -0
- package/src/lib/operator/definitions.js +110 -0
- package/src/lib/operator/definitions.js.map +1 -0
- package/src/lib/operator/index.d.ts +19 -0
- package/src/lib/operator/index.js +20 -0
- package/src/lib/operator/index.js.map +1 -0
- package/src/lib/operator/inference.d.ts +66 -0
- package/src/lib/operator/inference.js +60 -0
- package/src/lib/operator/inference.js.map +1 -0
- package/src/lib/secret-box.d.ts +152 -0
- package/src/lib/secret-box.js +263 -0
- package/src/lib/secret-box.js.map +1 -0
- package/src/lib/serialize/base64-isomorphic-decode.d.ts +23 -0
- package/src/lib/serialize/base64-isomorphic-decode.js +28 -0
- package/src/lib/serialize/base64-isomorphic-decode.js.map +1 -0
- package/src/lib/serialize/base64-isomorphic-encode.d.ts +23 -0
- package/src/lib/serialize/base64-isomorphic-encode.js +28 -0
- package/src/lib/serialize/base64-isomorphic-encode.js.map +1 -0
- package/src/lib/serialize/json-deserialize.d.ts +25 -0
- package/src/lib/serialize/json-deserialize.js +27 -0
- package/src/lib/serialize/json-deserialize.js.map +1 -0
- package/src/lib/serialize/json-serialize.d.ts +25 -0
- package/src/lib/serialize/json-serialize.js +27 -0
- package/src/lib/serialize/json-serialize.js.map +1 -0
- package/src/lib/serialize/php-serial-deserialize-from-byte-stream.d.ts +77 -0
- package/src/lib/serialize/php-serial-deserialize-from-byte-stream.js +77 -0
- package/src/lib/serialize/php-serial-deserialize-from-byte-stream.js.map +1 -0
- package/src/lib/serialize/php-serial-is-serialized-byte-stream.d.ts +77 -0
- package/src/lib/serialize/php-serial-is-serialized-byte-stream.js +77 -0
- package/src/lib/serialize/php-serial-is-serialized-byte-stream.js.map +1 -0
- package/src/lib/serialize/php-serial-serialize-to-byte-stream.d.ts +77 -0
- package/src/lib/serialize/php-serial-serialize-to-byte-stream.js +77 -0
- package/src/lib/serialize/php-serial-serialize-to-byte-stream.js.map +1 -0
- package/src/lib/split-display-name.d.ts +36 -0
- package/src/lib/split-display-name.js +47 -0
- package/src/lib/split-display-name.js.map +1 -0
- package/src/lib/str.d.ts +21 -0
- package/src/lib/str.js +23 -0
- package/src/lib/str.js.map +1 -0
- package/src/lib/trim.d.ts +25 -0
- package/src/lib/trim.js +28 -0
- package/src/lib/trim.js.map +1 -0
- package/src/lib/truthy.d.ts +23 -0
- package/src/lib/truthy.js +30 -0
- package/src/lib/truthy.js.map +1 -0
|
@@ -0,0 +1,29 @@
|
|
|
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 { _isStrT } from "./_is-str-t.js";
|
|
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
|
+
*/ export function _isNum(val, noStr) {
|
|
25
|
+
return noStr && _isStrT(val) ? false : !isNaN(Number(val));
|
|
26
|
+
}
|
|
27
|
+
export default _isNum;
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=_is-num.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../libs/shared/util/tools/src/lib/guards/lib/_is-num.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 { _isStrT } from './_is-str-t'\n\n/**\n * Is value a number, allows even if string (e.g. \"6\" vs 6)\n *\n * @export\n * @param {*} val\n * @param {boolean} [noStr]\n * @returns {val is number}\n */\nexport function _isNum(val: unknown, noStr?: boolean): val is number {\n return noStr && _isStrT(val) ? false : !isNaN(Number(val))\n}\nexport default _isNum\n"],"names":["_isStrT","_isNum","val","noStr","isNaN","Number"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,OAAO,QAAQ,iBAAa;AAErC;;;;;;;CAOC,GACD,OAAO,SAASC,OAAOC,GAAY,EAAEC,KAAe;IAClD,OAAOA,SAASH,QAAQE,OAAO,QAAQ,CAACE,MAAMC,OAAOH;AACvD;AACA,eAAeD,OAAM"}
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
* Is literal type object, this could be any Object type
|
|
19
|
+
* such as a function, class, null, {}, array etc
|
|
20
|
+
*
|
|
21
|
+
* @export
|
|
22
|
+
* @param {*} val
|
|
23
|
+
* @returns {val is object}
|
|
24
|
+
*/
|
|
25
|
+
export declare function _isObjT(val: unknown): val is Record<string | number, unknown>;
|
|
26
|
+
export default _isObjT;
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
* Is literal type object, this could be any Object type
|
|
18
|
+
* such as a function, class, null, {}, array etc
|
|
19
|
+
*
|
|
20
|
+
* @export
|
|
21
|
+
* @param {*} val
|
|
22
|
+
* @returns {val is object}
|
|
23
|
+
*/ export function _isObjT(val) {
|
|
24
|
+
return typeof val === 'object';
|
|
25
|
+
}
|
|
26
|
+
export default _isObjT;
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=_is-obj-t.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../libs/shared/util/tools/src/lib/guards/lib/_is-obj-t.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 * Is literal type object, this could be any Object type\n * such as a function, class, null, {}, array etc\n *\n * @export\n * @param {*} val\n * @returns {val is object}\n */\nexport function _isObjT(val: unknown): val is Record<string | number, unknown> {\n return typeof val === 'object'\n}\nexport default _isObjT\n"],"names":["_isObjT","val"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;;;CAOC,GACD,OAAO,SAASA,QAAQC,GAAY;IAClC,OAAO,OAAOA,QAAQ;AACxB;AACA,eAAeD,QAAO"}
|
|
@@ -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
|
+
/**
|
|
18
|
+
* Is actually a dictionary object (e.g. key:value), but not
|
|
19
|
+
* an array or null
|
|
20
|
+
*
|
|
21
|
+
* @export
|
|
22
|
+
* @param {*} val
|
|
23
|
+
* @param array
|
|
24
|
+
* @returns {val is Object}
|
|
25
|
+
*/
|
|
26
|
+
export declare function _isObj(val: unknown, array?: boolean): val is Record<string, unknown>;
|
|
27
|
+
export default _isObj;
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
*/ import _isArr from "./_is-arr.js";
|
|
17
|
+
import _isNull from "./_is-null.js";
|
|
18
|
+
import _isObjT from "./_is-obj-t.js";
|
|
19
|
+
/**
|
|
20
|
+
* Is actually a dictionary object (e.g. key:value), but not
|
|
21
|
+
* an array or null
|
|
22
|
+
*
|
|
23
|
+
* @export
|
|
24
|
+
* @param {*} val
|
|
25
|
+
* @param array
|
|
26
|
+
* @returns {val is Object}
|
|
27
|
+
*/ export function _isObj(val, array = false) {
|
|
28
|
+
return !_isNull(val) && _isObjT(val) && (!array ? !_isArr(val) : true);
|
|
29
|
+
}
|
|
30
|
+
export default _isObj;
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=_is-obj.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../libs/shared/util/tools/src/lib/guards/lib/_is-obj.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\nimport _isArr from './_is-arr'\nimport _isNull from './_is-null'\nimport _isObjT from './_is-obj-t'\n\n\n/**\n * Is actually a dictionary object (e.g. key:value), but not\n * an array or null\n *\n * @export\n * @param {*} val\n * @param array\n * @returns {val is Object}\n */\nexport function _isObj(val: unknown, array = false): val is Record<string, unknown> {\n return !_isNull(val)\n && _isObjT(val)\n && (!array ? !_isArr(val) : true)\n}\nexport default _isObj\n"],"names":["_isArr","_isNull","_isObjT","_isObj","val","array"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,OAAOA,YAAY,eAAW;AAC9B,OAAOC,aAAa,gBAAY;AAChC,OAAOC,aAAa,iBAAa;AAGjC;;;;;;;;CAQC,GACD,OAAO,SAASC,OAAOC,GAAY,EAAEC,QAAQ,KAAK;IAChD,OAAO,CAACJ,QAAQG,QACXF,QAAQE,QACP,CAAA,CAACC,QAAQ,CAACL,OAAOI,OAAO,IAAG;AACnC;AACA,eAAeD,OAAM"}
|
|
@@ -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
|
+
export type Primitive = string | number | bigint | boolean | undefined | symbol | null;
|
|
18
|
+
export type PrimitiveBasic = string | number | boolean | undefined | null;
|
|
19
|
+
/**
|
|
20
|
+
* Is literal type of primitive type
|
|
21
|
+
*
|
|
22
|
+
* @export
|
|
23
|
+
* @param {*} val
|
|
24
|
+
* @returns {val is Primitive}
|
|
25
|
+
*/
|
|
26
|
+
export declare function _isPrim(val: unknown): val is Primitive;
|
|
27
|
+
export default _isPrim;
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
*/ import { _isBig } from "./_is-big.js";
|
|
17
|
+
import { _isBool } from "./_is-bool.js";
|
|
18
|
+
import { _isFnT } from "./_is-fn-t.js";
|
|
19
|
+
import { _isNumT } from "./_is-num-t.js";
|
|
20
|
+
import { _isObjT } from "./_is-obj-t.js";
|
|
21
|
+
import { _isStrT } from "./_is-str-t.js";
|
|
22
|
+
import { _isSymT } from "./_is-sym-t.js";
|
|
23
|
+
import { _isUndT } from "./_is-und-t.js";
|
|
24
|
+
/**
|
|
25
|
+
* Is literal type of primitive type
|
|
26
|
+
*
|
|
27
|
+
* @export
|
|
28
|
+
* @param {*} val
|
|
29
|
+
* @returns {val is Primitive}
|
|
30
|
+
*/ export function _isPrim(val) {
|
|
31
|
+
return Boolean(_isSymT(val) || _isBig(val) || _isNumT(val) || _isObjT(val) || _isBool(val) || _isStrT(val) || _isFnT(val) || _isUndT(val));
|
|
32
|
+
}
|
|
33
|
+
export default _isPrim;
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=_is-prim.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../libs/shared/util/tools/src/lib/guards/lib/_is-prim.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\nimport { _isBig } from './_is-big'\nimport { _isBool } from './_is-bool'\nimport { _isFnT } from './_is-fn-t'\nimport { _isNumT } from './_is-num-t'\nimport { _isObjT } from './_is-obj-t'\nimport { _isStrT } from './_is-str-t'\nimport { _isSymT } from './_is-sym-t'\nimport { _isUndT } from './_is-und-t'\n\nexport type Primitive =\n | string\n | number\n | bigint\n | boolean\n | undefined\n | symbol\n | null\nexport type PrimitiveBasic = string | number | boolean | undefined | null\n/**\n * Is literal type of primitive type\n *\n * @export\n * @param {*} val\n * @returns {val is Primitive}\n */\nexport function _isPrim(val: unknown): val is Primitive {\n return Boolean(\n _isSymT(val) ||\n _isBig(val) ||\n _isNumT(val) ||\n _isObjT(val) ||\n _isBool(val) ||\n _isStrT(val) ||\n _isFnT(val) ||\n _isUndT(val),\n )\n}\nexport default _isPrim\n"],"names":["_isBig","_isBool","_isFnT","_isNumT","_isObjT","_isStrT","_isSymT","_isUndT","_isPrim","val","Boolean"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,MAAM,QAAQ,eAAW;AAClC,SAASC,OAAO,QAAQ,gBAAY;AACpC,SAASC,MAAM,QAAQ,gBAAY;AACnC,SAASC,OAAO,QAAQ,iBAAa;AACrC,SAASC,OAAO,QAAQ,iBAAa;AACrC,SAASC,OAAO,QAAQ,iBAAa;AACrC,SAASC,OAAO,QAAQ,iBAAa;AACrC,SAASC,OAAO,QAAQ,iBAAa;AAWrC;;;;;;CAMC,GACD,OAAO,SAASC,QAAQC,GAAY;IAClC,OAAOC,QACLJ,QAAQG,QACNT,OAAOS,QACPN,QAAQM,QACRL,QAAQK,QACRR,QAAQQ,QACRJ,QAAQI,QACRP,OAAOO,QACPF,QAAQE;AAEd;AACA,eAAeD,QAAO"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
* Check whether a value is a Promise-like instance.
|
|
19
|
+
* Recognizes both native promises and third-party promise libraries.
|
|
20
|
+
*
|
|
21
|
+
* @param value - The value to check.
|
|
22
|
+
*/
|
|
23
|
+
export declare function _isPromiseLike<T>(value: T | PromiseLike<T> | undefined): value is PromiseLike<T>;
|
|
24
|
+
export default _isPromiseLike;
|
|
@@ -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
|
+
*/ /**
|
|
17
|
+
* Check whether a value is a Promise-like instance.
|
|
18
|
+
* Recognizes both native promises and third-party promise libraries.
|
|
19
|
+
*
|
|
20
|
+
* @param value - The value to check.
|
|
21
|
+
*/ export function _isPromiseLike(value) {
|
|
22
|
+
if (!value) return false;
|
|
23
|
+
if (typeof value !== 'object' && typeof value !== 'function') return false;
|
|
24
|
+
return typeof value.then === 'function';
|
|
25
|
+
}
|
|
26
|
+
export default _isPromiseLike;
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=_is-promise-like.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../libs/shared/util/tools/src/lib/guards/lib/_is-promise-like.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 * Check whether a value is a Promise-like instance.\n * Recognizes both native promises and third-party promise libraries.\n *\n * @param value - The value to check.\n */\nexport function _isPromiseLike<T>(\n value: T | PromiseLike<T> | undefined,\n): value is PromiseLike<T> {\n if (!value) return false\n if (typeof value !== 'object' && typeof value !== 'function') return false\n return typeof (value as PromiseLike<T>).then === 'function'\n}\nexport default _isPromiseLike\n"],"names":["_isPromiseLike","value","then"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;CAKC,GACD,OAAO,SAASA,eACdC,KAAqC;IAErC,IAAI,CAACA,OAAO,OAAO;IACnB,IAAI,OAAOA,UAAU,YAAY,OAAOA,UAAU,YAAY,OAAO;IACrE,OAAO,OAAO,AAACA,MAAyBC,IAAI,KAAK;AACnD;AACA,eAAeF,eAAc"}
|
|
@@ -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 type empty string (e.g. "" vs "foo")
|
|
19
|
+
*
|
|
20
|
+
* @export
|
|
21
|
+
* @param {*} val
|
|
22
|
+
* @returns {val is ''}
|
|
23
|
+
*/
|
|
24
|
+
export declare function _isStrEmpty(val: unknown): val is '';
|
|
25
|
+
export default _isStrEmpty;
|
|
@@ -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 { _isStrT } from "./_is-str-t.js";
|
|
17
|
+
/**
|
|
18
|
+
* Is type empty string (e.g. "" vs "foo")
|
|
19
|
+
*
|
|
20
|
+
* @export
|
|
21
|
+
* @param {*} val
|
|
22
|
+
* @returns {val is ''}
|
|
23
|
+
*/ export function _isStrEmpty(val) {
|
|
24
|
+
return _isStrT(val) && !val.length;
|
|
25
|
+
}
|
|
26
|
+
export default _isStrEmpty;
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=_is-str-empty.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../libs/shared/util/tools/src/lib/guards/lib/_is-str-empty.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 { _isStrT } from './_is-str-t'\n\n/**\n * Is type empty string (e.g. \"\" vs \"foo\")\n *\n * @export\n * @param {*} val\n * @returns {val is ''}\n */\nexport function _isStrEmpty(val: unknown): val is '' {\n return _isStrT(val) && !val.length\n}\nexport default _isStrEmpty\n"],"names":["_isStrT","_isStrEmpty","val","length"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,OAAO,QAAQ,iBAAa;AAErC;;;;;;CAMC,GACD,OAAO,SAASC,YAAYC,GAAY;IACtC,OAAOF,QAAQE,QAAQ,CAACA,IAAIC,MAAM;AACpC;AACA,eAAeF,YAAW"}
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
* Is literal type string
|
|
19
|
+
*
|
|
20
|
+
* @export
|
|
21
|
+
* @param {*} val
|
|
22
|
+
* @param includeEmpty
|
|
23
|
+
* @returns {val is string}
|
|
24
|
+
*/
|
|
25
|
+
export declare function _isStrT(val: unknown): val is string;
|
|
26
|
+
export default _isStrT;
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
* Is literal type string
|
|
18
|
+
*
|
|
19
|
+
* @export
|
|
20
|
+
* @param {*} val
|
|
21
|
+
* @param includeEmpty
|
|
22
|
+
* @returns {val is string}
|
|
23
|
+
*/ export function _isStrT(val, includeEmpty = true) {
|
|
24
|
+
return typeof val === 'string' && (includeEmpty ? true : Boolean(val.length));
|
|
25
|
+
}
|
|
26
|
+
export default _isStrT;
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=_is-str-t.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../libs/shared/util/tools/src/lib/guards/lib/_is-str-t.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 * Is literal type string\n *\n * @export\n * @param {*} val\n * @param includeEmpty\n * @returns {val is string}\n */\nexport function _isStrT(val: unknown): val is string\nexport function _isStrT(val: unknown, includeEmpty = true): val is string {\n return typeof val === 'string' && (includeEmpty ? true : Boolean(val.length))\n}\n\nexport default _isStrT\n"],"names":["_isStrT","val","includeEmpty","Boolean","length"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;;;CAOC,GAED,OAAO,SAASA,QAAQC,GAAY,EAAEC,eAAe,IAAI;IACvD,OAAO,OAAOD,QAAQ,YAAaC,CAAAA,eAAe,OAAOC,QAAQF,IAAIG,MAAM,CAAA;AAC7E;AAEA,eAAeJ,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
|
+
* Is literal type symbol
|
|
19
|
+
*
|
|
20
|
+
* @export
|
|
21
|
+
* @param {*} val
|
|
22
|
+
* @returns {val is symbol}
|
|
23
|
+
*/
|
|
24
|
+
export declare function _isSymT(val: unknown): val is symbol;
|
|
25
|
+
export default _isSymT;
|
|
@@ -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 symbol
|
|
18
|
+
*
|
|
19
|
+
* @export
|
|
20
|
+
* @param {*} val
|
|
21
|
+
* @returns {val is symbol}
|
|
22
|
+
*/ export function _isSymT(val) {
|
|
23
|
+
return typeof val === 'symbol';
|
|
24
|
+
}
|
|
25
|
+
export default _isSymT;
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=_is-sym-t.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../libs/shared/util/tools/src/lib/guards/lib/_is-sym-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 symbol\n *\n * @export\n * @param {*} val\n * @returns {val is symbol}\n */\nexport function _isSymT(val: unknown): val is symbol {\n return typeof val === 'symbol'\n}\nexport default _isSymT\n"],"names":["_isSymT","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
|
+
* Is literal type null or undefined
|
|
19
|
+
*
|
|
20
|
+
* @export
|
|
21
|
+
* @param {*} val
|
|
22
|
+
* @returns {(val is null | undefined)}
|
|
23
|
+
*/
|
|
24
|
+
export declare function _isUndOrNull(val: unknown): val is null | undefined;
|
|
25
|
+
export default _isUndOrNull;
|
|
@@ -0,0 +1,29 @@
|
|
|
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 { _isNull } from "./_is-null.js";
|
|
17
|
+
import { _isUndT } from "./_is-und-t.js";
|
|
18
|
+
/**
|
|
19
|
+
* Is literal type null or undefined
|
|
20
|
+
*
|
|
21
|
+
* @export
|
|
22
|
+
* @param {*} val
|
|
23
|
+
* @returns {(val is null | undefined)}
|
|
24
|
+
*/ export function _isUndOrNull(val) {
|
|
25
|
+
return _isNull(val) || _isUndT(val);
|
|
26
|
+
}
|
|
27
|
+
export default _isUndOrNull;
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=_is-und-or-null.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../libs/shared/util/tools/src/lib/guards/lib/_is-und-or-null.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 { _isNull } from './_is-null'\nimport { _isUndT } from './_is-und-t'\n\n/**\n * Is literal type null or undefined\n *\n * @export\n * @param {*} val\n * @returns {(val is null | undefined)}\n */\nexport function _isUndOrNull(val: unknown): val is null | undefined {\n return _isNull(val) || _isUndT(val)\n}\nexport default _isUndOrNull\n"],"names":["_isNull","_isUndT","_isUndOrNull","val"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,OAAO,QAAQ,gBAAY;AACpC,SAASC,OAAO,QAAQ,iBAAa;AAErC;;;;;;CAMC,GACD,OAAO,SAASC,aAAaC,GAAY;IACvC,OAAOH,QAAQG,QAAQF,QAAQE;AACjC;AACA,eAAeD,aAAY"}
|
|
@@ -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 undefined
|
|
19
|
+
*
|
|
20
|
+
* @export
|
|
21
|
+
* @param {*} val
|
|
22
|
+
* @returns {val is undefined}
|
|
23
|
+
*/
|
|
24
|
+
export declare function _isUndT(val: unknown): val is undefined;
|
|
25
|
+
export default _isUndT;
|
|
@@ -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 undefined
|
|
18
|
+
*
|
|
19
|
+
* @export
|
|
20
|
+
* @param {*} val
|
|
21
|
+
* @returns {val is undefined}
|
|
22
|
+
*/ export function _isUndT(val) {
|
|
23
|
+
return typeof val === 'undefined';
|
|
24
|
+
}
|
|
25
|
+
export default _isUndT;
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=_is-und-t.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../libs/shared/util/tools/src/lib/guards/lib/_is-und-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 undefined\n *\n * @export\n * @param {*} val\n * @returns {val is undefined}\n */\nexport function _isUndT(val: unknown): val is undefined {\n return typeof val === 'undefined'\n}\nexport default _isUndT\n"],"names":["_isUndT","val"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;;CAMC,GACD,OAAO,SAASA,QAAQC,GAAY;IAClC,OAAO,OAAOA,QAAQ;AACxB;AACA,eAAeD,QAAO"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
export declare function interopDefault(mod: any): any;
|
|
18
|
+
export default interopDefault;
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
*/ export function interopDefault(mod) {
|
|
17
|
+
return (mod == null ? void 0 : mod.default) || mod;
|
|
18
|
+
}
|
|
19
|
+
export default interopDefault;
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=interop-default.js.map
|