@stryke/type-checks 0.5.18 → 0.5.19
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/CHANGELOG.md +6 -0
- package/dist/get-object-tag.cjs +15 -1
- package/dist/get-object-tag.mjs +14 -1
- package/dist/get-object-tag.mjs.map +1 -1
- package/dist/index.cjs +100 -1
- package/dist/index.mjs +45 -1
- package/dist/is-array-like.cjs +17 -1
- package/dist/is-array-like.mjs +17 -1
- package/dist/is-array-like.mjs.map +1 -1
- package/dist/is-async-iterable.cjs +16 -1
- package/dist/is-async-iterable.mjs +16 -1
- package/dist/is-async-iterable.mjs.map +1 -1
- package/dist/is-bigint.cjs +22 -1
- package/dist/is-bigint.mjs +22 -1
- package/dist/is-bigint.mjs.map +1 -1
- package/dist/is-boolean.cjs +18 -1
- package/dist/is-boolean.mjs +17 -1
- package/dist/is-boolean.mjs.map +1 -1
- package/dist/is-buffer.cjs +13 -1
- package/dist/is-buffer.mjs +11 -1
- package/dist/is-buffer.mjs.map +1 -1
- package/dist/is-collection.cjs +22 -1
- package/dist/is-collection.mjs +22 -1
- package/dist/is-collection.mjs.map +1 -1
- package/dist/is-date.cjs +23 -1
- package/dist/is-date.mjs +23 -1
- package/dist/is-date.mjs.map +1 -1
- package/dist/is-deep-key.cjs +52 -1
- package/dist/is-deep-key.mjs +50 -1
- package/dist/is-deep-key.mjs.map +1 -1
- package/dist/is-empty-object.cjs +33 -1
- package/dist/is-empty-object.mjs +32 -1
- package/dist/is-empty-object.mjs.map +1 -1
- package/dist/is-empty-string.cjs +20 -1
- package/dist/is-empty-string.mjs +20 -1
- package/dist/is-empty-string.mjs.map +1 -1
- package/dist/is-empty.cjs +38 -1
- package/dist/is-empty.mjs +37 -1
- package/dist/is-empty.mjs.map +1 -1
- package/dist/is-equal.cjs +19 -1
- package/dist/is-equal.mjs +18 -1
- package/dist/is-equal.mjs.map +1 -1
- package/dist/is-error.cjs +29 -1
- package/dist/is-error.mjs +29 -1
- package/dist/is-error.mjs.map +1 -1
- package/dist/is-file-result.cjs +21 -1
- package/dist/is-file-result.mjs +21 -1
- package/dist/is-file-result.mjs.map +1 -1
- package/dist/is-float.cjs +13 -1
- package/dist/is-float.mjs +13 -1
- package/dist/is-float.mjs.map +1 -1
- package/dist/is-function.cjs +27 -1
- package/dist/is-function.mjs +25 -1
- package/dist/is-function.mjs.map +1 -1
- package/dist/is-integer.cjs +14 -1
- package/dist/is-integer.mjs +14 -1
- package/dist/is-integer.mjs.map +1 -1
- package/dist/is-mergeable-object.cjs +14 -1
- package/dist/is-mergeable-object.mjs +14 -1
- package/dist/is-mergeable-object.mjs.map +1 -1
- package/dist/is-non-null-object.cjs +16 -1
- package/dist/is-non-null-object.mjs +16 -1
- package/dist/is-non-null-object.mjs.map +1 -1
- package/dist/is-not-empty.cjs +21 -1
- package/dist/is-not-empty.mjs +21 -1
- package/dist/is-not-empty.mjs.map +1 -1
- package/dist/is-null.cjs +12 -1
- package/dist/is-null.mjs +11 -1
- package/dist/is-null.mjs.map +1 -1
- package/dist/is-number.cjs +29 -1
- package/dist/is-number.mjs +28 -1
- package/dist/is-number.mjs.map +1 -1
- package/dist/is-object-index.cjs +19 -1
- package/dist/is-object-index.mjs +18 -1
- package/dist/is-object-index.mjs.map +1 -1
- package/dist/is-object.cjs +47 -1
- package/dist/is-object.mjs +44 -1
- package/dist/is-object.mjs.map +1 -1
- package/dist/is-plain-object.cjs +64 -1
- package/dist/is-plain-object.mjs +63 -1
- package/dist/is-plain-object.mjs.map +1 -1
- package/dist/is-primitive.cjs +12 -1
- package/dist/is-primitive.mjs +11 -1
- package/dist/is-primitive.mjs.map +1 -1
- package/dist/is-promise.cjs +27 -1
- package/dist/is-promise.mjs +26 -1
- package/dist/is-promise.mjs.map +1 -1
- package/dist/is-react-element.cjs +8 -1
- package/dist/is-react-element.mjs +7 -1
- package/dist/is-react-element.mjs.map +1 -1
- package/dist/is-ref.cjs +18 -1
- package/dist/is-ref.mjs +17 -1
- package/dist/is-ref.mjs.map +1 -1
- package/dist/is-regexp.cjs +23 -1
- package/dist/is-regexp.mjs +23 -1
- package/dist/is-regexp.mjs.map +1 -1
- package/dist/is-select-option.cjs +19 -1
- package/dist/is-select-option.mjs +19 -1
- package/dist/is-select-option.mjs.map +1 -1
- package/dist/is-set-array.cjs +15 -1
- package/dist/is-set-array.mjs +15 -1
- package/dist/is-set-array.mjs.map +1 -1
- package/dist/is-set-object.cjs +19 -1
- package/dist/is-set-object.mjs +19 -1
- package/dist/is-set-object.mjs.map +1 -1
- package/dist/is-set-string.cjs +20 -1
- package/dist/is-set-string.mjs +20 -1
- package/dist/is-set-string.mjs.map +1 -1
- package/dist/is-set.cjs +19 -1
- package/dist/is-set.mjs +19 -1
- package/dist/is-set.mjs.map +1 -1
- package/dist/is-string.cjs +12 -1
- package/dist/is-string.mjs +11 -1
- package/dist/is-string.mjs.map +1 -1
- package/dist/is-symbol.cjs +12 -1
- package/dist/is-symbol.mjs +11 -1
- package/dist/is-symbol.mjs.map +1 -1
- package/dist/is-typed-array.cjs +8 -1
- package/dist/is-typed-array.mjs +7 -1
- package/dist/is-typed-array.mjs.map +1 -1
- package/dist/is-typed.cjs +20 -1
- package/dist/is-typed.mjs +20 -1
- package/dist/is-typed.mjs.map +1 -1
- package/dist/is-undefined.cjs +8 -1
- package/dist/is-undefined.mjs +7 -1
- package/dist/is-undefined.mjs.map +1 -1
- package/dist/is-url.cjs +16 -1
- package/dist/is-url.mjs +16 -1
- package/dist/is-url.mjs.map +1 -1
- package/dist/property-exists.cjs +31 -1
- package/dist/property-exists.mjs +30 -1
- package/dist/property-exists.mjs.map +1 -1
- package/dist/type-detect.cjs +54 -1
- package/dist/type-detect.mjs +54 -1
- package/dist/type-detect.mjs.map +1 -1
- package/dist/types/src/base.cjs +6 -1
- package/dist/types/src/base.mjs +5 -1
- package/dist/types/src/base.mjs.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog for Stryke - Type Checks
|
|
4
4
|
|
|
5
|
+
## [0.5.18](https://github.com/storm-software/stryke/releases/tag/type-checks%400.5.18) (01/16/2026)
|
|
6
|
+
|
|
7
|
+
### Updated Dependencies
|
|
8
|
+
|
|
9
|
+
- Updated **types** to **v0.10.32**
|
|
10
|
+
|
|
5
11
|
## [0.5.17](https://github.com/storm-software/stryke/releases/tag/type-checks%400.5.17) (01/15/2026)
|
|
6
12
|
|
|
7
13
|
### Updated Dependencies
|
package/dist/get-object-tag.cjs
CHANGED
|
@@ -1 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
//#region src/get-object-tag.ts
|
|
3
|
+
/**
|
|
4
|
+
* Gets the `toStringTag` of `obj`.
|
|
5
|
+
*
|
|
6
|
+
* @param value - The obj to query.
|
|
7
|
+
* @returns Returns the `toStringTag`.
|
|
8
|
+
*/
|
|
9
|
+
const getObjectTag = (value) => {
|
|
10
|
+
if (value == null) return value === void 0 ? "[object Undefined]" : "[object Null]";
|
|
11
|
+
return Object.prototype.toString.call(value);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
exports.getObjectTag = getObjectTag;
|
package/dist/get-object-tag.mjs
CHANGED
|
@@ -1,2 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/get-object-tag.ts
|
|
2
|
+
/**
|
|
3
|
+
* Gets the `toStringTag` of `obj`.
|
|
4
|
+
*
|
|
5
|
+
* @param value - The obj to query.
|
|
6
|
+
* @returns Returns the `toStringTag`.
|
|
7
|
+
*/
|
|
8
|
+
const getObjectTag = (value) => {
|
|
9
|
+
if (value == null) return value === void 0 ? "[object Undefined]" : "[object Null]";
|
|
10
|
+
return Object.prototype.toString.call(value);
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
export { getObjectTag };
|
|
2
15
|
//# sourceMappingURL=get-object-tag.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-object-tag.mjs","names":[],"sources":["../src/get-object-tag.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * Gets the `toStringTag` of `obj`.\n *\n * @param value - The obj to query.\n * @returns Returns the `toStringTag`.\n */\nexport const getObjectTag = (value: unknown): string => {\n if (value == null) {\n return value === undefined ? \"[object Undefined]\" : \"[object Null]\";\n }\n return Object.prototype.toString.call(value);\n};\n"],"mappings":"AAwBA,MAAa,
|
|
1
|
+
{"version":3,"file":"get-object-tag.mjs","names":[],"sources":["../src/get-object-tag.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * Gets the `toStringTag` of `obj`.\n *\n * @param value - The obj to query.\n * @returns Returns the `toStringTag`.\n */\nexport const getObjectTag = (value: unknown): string => {\n if (value == null) {\n return value === undefined ? \"[object Undefined]\" : \"[object Null]\";\n }\n return Object.prototype.toString.call(value);\n};\n"],"mappings":";;;;;;;AAwBA,MAAa,gBAAgB,UAA2B;AACtD,KAAI,SAAS,KACX,QAAO,UAAU,SAAY,uBAAuB;AAEtD,QAAO,OAAO,UAAU,SAAS,KAAK,MAAM"}
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1,100 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_get_object_tag = require('./get-object-tag.cjs');
|
|
2
|
+
const require_is_plain_object = require('./is-plain-object.cjs');
|
|
3
|
+
const require_is_date = require('./is-date.cjs');
|
|
4
|
+
const require_is_function = require('./is-function.cjs');
|
|
5
|
+
const require_is_null = require('./is-null.cjs');
|
|
6
|
+
const require_is_number = require('./is-number.cjs');
|
|
7
|
+
const require_is_symbol = require('./is-symbol.cjs');
|
|
8
|
+
const require_is_undefined = require('./is-undefined.cjs');
|
|
9
|
+
const require_is_empty = require('./is-empty.cjs');
|
|
10
|
+
const require_is_object = require('./is-object.cjs');
|
|
11
|
+
const require_is_array_like = require('./is-array-like.cjs');
|
|
12
|
+
const require_is_async_iterable = require('./is-async-iterable.cjs');
|
|
13
|
+
const require_is_bigint = require('./is-bigint.cjs');
|
|
14
|
+
const require_is_boolean = require('./is-boolean.cjs');
|
|
15
|
+
const require_is_buffer = require('./is-buffer.cjs');
|
|
16
|
+
const require_type_detect = require('./type-detect.cjs');
|
|
17
|
+
const require_is_collection = require('./is-collection.cjs');
|
|
18
|
+
const require_is_deep_key = require('./is-deep-key.cjs');
|
|
19
|
+
const require_is_empty_object = require('./is-empty-object.cjs');
|
|
20
|
+
const require_is_string = require('./is-string.cjs');
|
|
21
|
+
const require_is_empty_string = require('./is-empty-string.cjs');
|
|
22
|
+
const require_is_equal = require('./is-equal.cjs');
|
|
23
|
+
const require_is_error = require('./is-error.cjs');
|
|
24
|
+
const require_is_set = require('./is-set.cjs');
|
|
25
|
+
const require_is_set_object = require('./is-set-object.cjs');
|
|
26
|
+
const require_is_set_string = require('./is-set-string.cjs');
|
|
27
|
+
const require_is_file_result = require('./is-file-result.cjs');
|
|
28
|
+
const require_is_float = require('./is-float.cjs');
|
|
29
|
+
const require_is_integer = require('./is-integer.cjs');
|
|
30
|
+
const require_is_react_element = require('./is-react-element.cjs');
|
|
31
|
+
const require_is_mergeable_object = require('./is-mergeable-object.cjs');
|
|
32
|
+
const require_is_not_empty = require('./is-not-empty.cjs');
|
|
33
|
+
const require_is_object_index = require('./is-object-index.cjs');
|
|
34
|
+
const require_is_primitive = require('./is-primitive.cjs');
|
|
35
|
+
const require_is_promise = require('./is-promise.cjs');
|
|
36
|
+
const require_is_ref = require('./is-ref.cjs');
|
|
37
|
+
const require_is_regexp = require('./is-regexp.cjs');
|
|
38
|
+
const require_is_select_option = require('./is-select-option.cjs');
|
|
39
|
+
const require_is_set_array = require('./is-set-array.cjs');
|
|
40
|
+
const require_is_typed = require('./is-typed.cjs');
|
|
41
|
+
const require_is_typed_array = require('./is-typed-array.cjs');
|
|
42
|
+
const require_is_url = require('./is-url.cjs');
|
|
43
|
+
const require_property_exists = require('./property-exists.cjs');
|
|
44
|
+
|
|
45
|
+
exports.getObjectTag = require_get_object_tag.getObjectTag;
|
|
46
|
+
exports.isAnyNumber = require_is_number.isAnyNumber;
|
|
47
|
+
exports.isArrayLike = require_is_array_like.isArrayLike;
|
|
48
|
+
exports.isAsyncFunction = require_is_function.isAsyncFunction;
|
|
49
|
+
exports.isAsyncIterable = require_is_async_iterable.isAsyncIterable;
|
|
50
|
+
exports.isBigInt = require_is_bigint.isBigInt;
|
|
51
|
+
exports.isBoolean = require_is_boolean.isBoolean;
|
|
52
|
+
exports.isBuffer = require_is_buffer.isBuffer;
|
|
53
|
+
exports.isBufferExists = require_is_buffer.isBufferExists;
|
|
54
|
+
exports.isClass = require_is_object.isClass;
|
|
55
|
+
exports.isCollection = require_is_collection.isCollection;
|
|
56
|
+
exports.isConventionalClass = require_is_object.isConventionalClass;
|
|
57
|
+
exports.isDate = require_is_date.isDate;
|
|
58
|
+
exports.isDeepKey = require_is_deep_key.isDeepKey;
|
|
59
|
+
exports.isEmpty = require_is_empty.isEmpty;
|
|
60
|
+
exports.isEmptyAnything = require_is_empty.isEmptyAnything;
|
|
61
|
+
exports.isEmptyObject = require_is_empty_object.isEmptyObject;
|
|
62
|
+
exports.isEmptyOrEmptyObject = require_is_empty_object.isEmptyOrEmptyObject;
|
|
63
|
+
exports.isEmptyString = require_is_empty_string.isEmptyString;
|
|
64
|
+
exports.isEqual = require_is_equal.isEqual;
|
|
65
|
+
exports.isError = require_is_error.isError;
|
|
66
|
+
exports.isFileResult = require_is_file_result.isFileResult;
|
|
67
|
+
exports.isFloat = require_is_float.isFloat;
|
|
68
|
+
exports.isFunction = require_is_function.isFunction;
|
|
69
|
+
exports.isInteger = require_is_integer.isInteger;
|
|
70
|
+
exports.isKeyOrDeepKey = require_is_deep_key.isKeyOrDeepKey;
|
|
71
|
+
exports.isMergeableObject = require_is_mergeable_object.isMergeableObject;
|
|
72
|
+
exports.isNativeClass = require_is_object.isNativeClass;
|
|
73
|
+
exports.isNotEmpty = require_is_not_empty.isNotEmpty;
|
|
74
|
+
exports.isNull = require_is_null.isNull;
|
|
75
|
+
exports.isNumber = require_is_number.isNumber;
|
|
76
|
+
exports.isObject = require_is_object.isObject;
|
|
77
|
+
exports.isObjectIndex = require_is_object_index.isObjectIndex;
|
|
78
|
+
exports.isObjectLike = require_is_plain_object.isObjectLike;
|
|
79
|
+
exports.isPlainObject = require_is_plain_object.isPlainObject;
|
|
80
|
+
exports.isPrimitive = require_is_primitive.isPrimitive;
|
|
81
|
+
exports.isPromise = require_is_promise.isPromise;
|
|
82
|
+
exports.isPromiseLike = require_is_promise.isPromiseLike;
|
|
83
|
+
exports.isReactElement = require_is_react_element.isReactElement;
|
|
84
|
+
exports.isRef = require_is_ref.isRef;
|
|
85
|
+
exports.isRegExp = require_is_regexp.isRegExp;
|
|
86
|
+
exports.isSelectOption = require_is_select_option.isSelectOption;
|
|
87
|
+
exports.isSet = require_is_set.isSet;
|
|
88
|
+
exports.isSetArray = require_is_set_array.isSetArray;
|
|
89
|
+
exports.isSetObject = require_is_set_object.isSetObject;
|
|
90
|
+
exports.isSetString = require_is_set_string.isSetString;
|
|
91
|
+
exports.isString = require_is_string.isString;
|
|
92
|
+
exports.isSymbol = require_is_symbol.isSymbol;
|
|
93
|
+
exports.isSyncFunction = require_is_function.isSyncFunction;
|
|
94
|
+
exports.isTyped = require_is_typed.isTyped;
|
|
95
|
+
exports.isTypedArray = require_is_typed_array.isTypedArray;
|
|
96
|
+
exports.isURL = require_is_url.isURL;
|
|
97
|
+
exports.isUndefined = require_is_undefined.isUndefined;
|
|
98
|
+
exports.propertyExists = require_property_exists.propertyExists;
|
|
99
|
+
exports.propertyUnsafe = require_property_exists.propertyUnsafe;
|
|
100
|
+
exports.typeDetect = require_type_detect.typeDetect;
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1,45 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { getObjectTag } from "./get-object-tag.mjs";
|
|
2
|
+
import { isObjectLike, isPlainObject } from "./is-plain-object.mjs";
|
|
3
|
+
import { isDate } from "./is-date.mjs";
|
|
4
|
+
import { isAsyncFunction, isFunction, isSyncFunction } from "./is-function.mjs";
|
|
5
|
+
import { isNull } from "./is-null.mjs";
|
|
6
|
+
import { isAnyNumber, isNumber } from "./is-number.mjs";
|
|
7
|
+
import { isSymbol } from "./is-symbol.mjs";
|
|
8
|
+
import { isUndefined } from "./is-undefined.mjs";
|
|
9
|
+
import { isEmpty, isEmptyAnything } from "./is-empty.mjs";
|
|
10
|
+
import { isClass, isConventionalClass, isNativeClass, isObject } from "./is-object.mjs";
|
|
11
|
+
import { isArrayLike } from "./is-array-like.mjs";
|
|
12
|
+
import { isAsyncIterable } from "./is-async-iterable.mjs";
|
|
13
|
+
import { isBigInt } from "./is-bigint.mjs";
|
|
14
|
+
import { isBoolean } from "./is-boolean.mjs";
|
|
15
|
+
import { isBuffer, isBufferExists } from "./is-buffer.mjs";
|
|
16
|
+
import { typeDetect } from "./type-detect.mjs";
|
|
17
|
+
import { isCollection } from "./is-collection.mjs";
|
|
18
|
+
import { isDeepKey, isKeyOrDeepKey } from "./is-deep-key.mjs";
|
|
19
|
+
import { isEmptyObject, isEmptyOrEmptyObject } from "./is-empty-object.mjs";
|
|
20
|
+
import { isString } from "./is-string.mjs";
|
|
21
|
+
import { isEmptyString } from "./is-empty-string.mjs";
|
|
22
|
+
import { isEqual } from "./is-equal.mjs";
|
|
23
|
+
import { isError } from "./is-error.mjs";
|
|
24
|
+
import { isSet } from "./is-set.mjs";
|
|
25
|
+
import { isSetObject } from "./is-set-object.mjs";
|
|
26
|
+
import { isSetString } from "./is-set-string.mjs";
|
|
27
|
+
import { isFileResult } from "./is-file-result.mjs";
|
|
28
|
+
import { isFloat } from "./is-float.mjs";
|
|
29
|
+
import { isInteger } from "./is-integer.mjs";
|
|
30
|
+
import { isReactElement } from "./is-react-element.mjs";
|
|
31
|
+
import { isMergeableObject } from "./is-mergeable-object.mjs";
|
|
32
|
+
import { isNotEmpty } from "./is-not-empty.mjs";
|
|
33
|
+
import { isObjectIndex } from "./is-object-index.mjs";
|
|
34
|
+
import { isPrimitive } from "./is-primitive.mjs";
|
|
35
|
+
import { isPromise, isPromiseLike } from "./is-promise.mjs";
|
|
36
|
+
import { isRef } from "./is-ref.mjs";
|
|
37
|
+
import { isRegExp } from "./is-regexp.mjs";
|
|
38
|
+
import { isSelectOption } from "./is-select-option.mjs";
|
|
39
|
+
import { isSetArray } from "./is-set-array.mjs";
|
|
40
|
+
import { isTyped } from "./is-typed.mjs";
|
|
41
|
+
import { isTypedArray } from "./is-typed-array.mjs";
|
|
42
|
+
import { isURL } from "./is-url.mjs";
|
|
43
|
+
import { propertyExists, propertyUnsafe } from "./property-exists.mjs";
|
|
44
|
+
|
|
45
|
+
export { getObjectTag, isAnyNumber, isArrayLike, isAsyncFunction, isAsyncIterable, isBigInt, isBoolean, isBuffer, isBufferExists, isClass, isCollection, isConventionalClass, isDate, isDeepKey, isEmpty, isEmptyAnything, isEmptyObject, isEmptyOrEmptyObject, isEmptyString, isEqual, isError, isFileResult, isFloat, isFunction, isInteger, isKeyOrDeepKey, isMergeableObject, isNativeClass, isNotEmpty, isNull, isNumber, isObject, isObjectIndex, isObjectLike, isPlainObject, isPrimitive, isPromise, isPromiseLike, isReactElement, isRef, isRegExp, isSelectOption, isSet, isSetArray, isSetObject, isSetString, isString, isSymbol, isSyncFunction, isTyped, isTypedArray, isURL, isUndefined, propertyExists, propertyUnsafe, typeDetect };
|
package/dist/is-array-like.cjs
CHANGED
|
@@ -1 +1,17 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_is_number = require('./is-number.cjs');
|
|
2
|
+
const require_is_empty = require('./is-empty.cjs');
|
|
3
|
+
const require_is_object = require('./is-object.cjs');
|
|
4
|
+
|
|
5
|
+
//#region src/is-array-like.ts
|
|
6
|
+
/**
|
|
7
|
+
* Check if the provided value's type is "array-like"
|
|
8
|
+
*
|
|
9
|
+
* @param value - The value to type check
|
|
10
|
+
* @returns An indicator specifying if the object provided is "array-like"
|
|
11
|
+
*/
|
|
12
|
+
const isArrayLike = (value) => {
|
|
13
|
+
return require_is_object.isObject(value) && !require_is_empty.isEmpty(value) && "length" in value && require_is_number.isNumber(value.length) && (value.length === 0 || value.length > 0 && Object.prototype.hasOwnProperty.call(value, value.length - 1));
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
exports.isArrayLike = isArrayLike;
|
package/dist/is-array-like.mjs
CHANGED
|
@@ -1,2 +1,18 @@
|
|
|
1
|
-
import{isNumber
|
|
1
|
+
import { isNumber } from "./is-number.mjs";
|
|
2
|
+
import { isEmpty } from "./is-empty.mjs";
|
|
3
|
+
import { isObject } from "./is-object.mjs";
|
|
4
|
+
|
|
5
|
+
//#region src/is-array-like.ts
|
|
6
|
+
/**
|
|
7
|
+
* Check if the provided value's type is "array-like"
|
|
8
|
+
*
|
|
9
|
+
* @param value - The value to type check
|
|
10
|
+
* @returns An indicator specifying if the object provided is "array-like"
|
|
11
|
+
*/
|
|
12
|
+
const isArrayLike = (value) => {
|
|
13
|
+
return isObject(value) && !isEmpty(value) && "length" in value && isNumber(value.length) && (value.length === 0 || value.length > 0 && Object.prototype.hasOwnProperty.call(value, value.length - 1));
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
export { isArrayLike };
|
|
2
18
|
//# sourceMappingURL=is-array-like.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-array-like.mjs","names":[],"sources":["../src/is-array-like.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isEmpty } from \"./is-empty\";\nimport { isNumber } from \"./is-number\";\nimport { isObject } from \"./is-object\";\n\n/**\n * Check if the provided value's type is \"array-like\"\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the object provided is \"array-like\"\n */\nexport const isArrayLike = (value: any): boolean => {\n return (\n isObject(value) &&\n !isEmpty(value) &&\n \"length\" in value &&\n isNumber(value.length) &&\n (value.length === 0 ||\n (value.length > 0 &&\n Object.prototype.hasOwnProperty.call(value, value.length - 1)))\n );\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"is-array-like.mjs","names":[],"sources":["../src/is-array-like.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isEmpty } from \"./is-empty\";\nimport { isNumber } from \"./is-number\";\nimport { isObject } from \"./is-object\";\n\n/**\n * Check if the provided value's type is \"array-like\"\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the object provided is \"array-like\"\n */\nexport const isArrayLike = (value: any): boolean => {\n return (\n isObject(value) &&\n !isEmpty(value) &&\n \"length\" in value &&\n isNumber(value.length) &&\n (value.length === 0 ||\n (value.length > 0 &&\n Object.prototype.hasOwnProperty.call(value, value.length - 1)))\n );\n};\n"],"mappings":";;;;;;;;;;;AA4BA,MAAa,eAAe,UAAwB;AAClD,QACE,SAAS,MAAM,IACf,CAAC,QAAQ,MAAM,IACf,YAAY,SACZ,SAAS,MAAM,OAAO,KACrB,MAAM,WAAW,KACf,MAAM,SAAS,KACd,OAAO,UAAU,eAAe,KAAK,OAAO,MAAM,SAAS,EAAE"}
|
|
@@ -1 +1,16 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_is_null = require('./is-null.cjs');
|
|
2
|
+
const require_is_object = require('./is-object.cjs');
|
|
3
|
+
|
|
4
|
+
//#region src/is-async-iterable.ts
|
|
5
|
+
/**
|
|
6
|
+
* Check if the provided value's type is `AsyncIterable`
|
|
7
|
+
*
|
|
8
|
+
* @param value - The value to type check
|
|
9
|
+
* @returns An indicator specifying if the object provided is `AsyncIterable`
|
|
10
|
+
*/
|
|
11
|
+
const isAsyncIterable = (value) => {
|
|
12
|
+
return require_is_object.isObject(value) && !require_is_null.isNull(value) && Symbol.asyncIterator in value;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
exports.isAsyncIterable = isAsyncIterable;
|
|
@@ -1,2 +1,17 @@
|
|
|
1
|
-
import{isNull
|
|
1
|
+
import { isNull } from "./is-null.mjs";
|
|
2
|
+
import { isObject } from "./is-object.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/is-async-iterable.ts
|
|
5
|
+
/**
|
|
6
|
+
* Check if the provided value's type is `AsyncIterable`
|
|
7
|
+
*
|
|
8
|
+
* @param value - The value to type check
|
|
9
|
+
* @returns An indicator specifying if the object provided is `AsyncIterable`
|
|
10
|
+
*/
|
|
11
|
+
const isAsyncIterable = (value) => {
|
|
12
|
+
return isObject(value) && !isNull(value) && Symbol.asyncIterator in value;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
export { isAsyncIterable };
|
|
2
17
|
//# sourceMappingURL=is-async-iterable.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-async-iterable.mjs","names":[],"sources":["../src/is-async-iterable.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isNull } from \"./is-null\";\nimport { isObject } from \"./is-object\";\n\n/**\n * Check if the provided value's type is `AsyncIterable`\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the object provided is `AsyncIterable`\n */\nexport const isAsyncIterable = (\n value: unknown\n): value is AsyncIterable<unknown> => {\n return isObject(value) && !isNull(value) && Symbol.asyncIterator in value;\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"is-async-iterable.mjs","names":[],"sources":["../src/is-async-iterable.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isNull } from \"./is-null\";\nimport { isObject } from \"./is-object\";\n\n/**\n * Check if the provided value's type is `AsyncIterable`\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the object provided is `AsyncIterable`\n */\nexport const isAsyncIterable = (\n value: unknown\n): value is AsyncIterable<unknown> => {\n return isObject(value) && !isNull(value) && Symbol.asyncIterator in value;\n};\n"],"mappings":";;;;;;;;;;AA2BA,MAAa,mBACX,UACoC;AACpC,QAAO,SAAS,MAAM,IAAI,CAAC,OAAO,MAAM,IAAI,OAAO,iBAAiB"}
|
package/dist/is-bigint.cjs
CHANGED
|
@@ -1 +1,22 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_get_object_tag = require('./get-object-tag.cjs');
|
|
2
|
+
|
|
3
|
+
//#region src/is-bigint.ts
|
|
4
|
+
/**
|
|
5
|
+
* Checks if `value` is classified as a `bigint` object.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* isDate(37n)
|
|
10
|
+
* // => true
|
|
11
|
+
*
|
|
12
|
+
* isBigInt(37)
|
|
13
|
+
* // => false
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* @param value - The obj to check.
|
|
17
|
+
* @returns Returns `true` if `value` is a bigint object, else `false`.
|
|
18
|
+
*/
|
|
19
|
+
const isBigInt = (value) => typeof value === "bigint" || require_get_object_tag.getObjectTag(value) == "[object BigInt]";
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
exports.isBigInt = isBigInt;
|
package/dist/is-bigint.mjs
CHANGED
|
@@ -1,2 +1,23 @@
|
|
|
1
|
-
import{getObjectTag
|
|
1
|
+
import { getObjectTag } from "./get-object-tag.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/is-bigint.ts
|
|
4
|
+
/**
|
|
5
|
+
* Checks if `value` is classified as a `bigint` object.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* isDate(37n)
|
|
10
|
+
* // => true
|
|
11
|
+
*
|
|
12
|
+
* isBigInt(37)
|
|
13
|
+
* // => false
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* @param value - The obj to check.
|
|
17
|
+
* @returns Returns `true` if `value` is a bigint object, else `false`.
|
|
18
|
+
*/
|
|
19
|
+
const isBigInt = (value) => typeof value === "bigint" || getObjectTag(value) == "[object BigInt]";
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
export { isBigInt };
|
|
2
23
|
//# sourceMappingURL=is-bigint.mjs.map
|
package/dist/is-bigint.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-bigint.mjs","names":[],"sources":["../src/is-bigint.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { getObjectTag } from \"./get-object-tag\";\n\n/**\n * Checks if `value` is classified as a `bigint` object.\n *\n * @example\n * ```typescript\n * isDate(37n)\n * // => true\n *\n * isBigInt(37)\n * // => false\n * ```\n *\n * @param value - The obj to check.\n * @returns Returns `true` if `value` is a bigint object, else `false`.\n */\nexport const isBigInt = (value: unknown): value is bigint =>\n typeof value === \"bigint\" || getObjectTag(value) == \"[object BigInt]\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"is-bigint.mjs","names":[],"sources":["../src/is-bigint.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { getObjectTag } from \"./get-object-tag\";\n\n/**\n * Checks if `value` is classified as a `bigint` object.\n *\n * @example\n * ```typescript\n * isDate(37n)\n * // => true\n *\n * isBigInt(37)\n * // => false\n * ```\n *\n * @param value - The obj to check.\n * @returns Returns `true` if `value` is a bigint object, else `false`.\n */\nexport const isBigInt = (value: unknown): value is bigint =>\n typeof value === \"bigint\" || getObjectTag(value) == \"[object BigInt]\";\n"],"mappings":";;;;;;;;;;;;;;;;;;AAmCA,MAAa,YAAY,UACvB,OAAO,UAAU,YAAY,aAAa,MAAM,IAAI"}
|
package/dist/is-boolean.cjs
CHANGED
|
@@ -1 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
//#region src/is-boolean.ts
|
|
3
|
+
/**
|
|
4
|
+
* Check if the provided value's type is `boolean`
|
|
5
|
+
*
|
|
6
|
+
* @param value - The value to type check
|
|
7
|
+
* @returns An indicator specifying if the value provided is of type `boolean`
|
|
8
|
+
*/
|
|
9
|
+
const isBoolean = (value) => {
|
|
10
|
+
try {
|
|
11
|
+
return value instanceof Boolean || typeof value === "boolean" || Boolean(value) === value;
|
|
12
|
+
} catch {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
exports.isBoolean = isBoolean;
|
package/dist/is-boolean.mjs
CHANGED
|
@@ -1,2 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/is-boolean.ts
|
|
2
|
+
/**
|
|
3
|
+
* Check if the provided value's type is `boolean`
|
|
4
|
+
*
|
|
5
|
+
* @param value - The value to type check
|
|
6
|
+
* @returns An indicator specifying if the value provided is of type `boolean`
|
|
7
|
+
*/
|
|
8
|
+
const isBoolean = (value) => {
|
|
9
|
+
try {
|
|
10
|
+
return value instanceof Boolean || typeof value === "boolean" || Boolean(value) === value;
|
|
11
|
+
} catch {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
export { isBoolean };
|
|
2
18
|
//# sourceMappingURL=is-boolean.mjs.map
|
package/dist/is-boolean.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-boolean.mjs","names":[],"sources":["../src/is-boolean.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * Check if the provided value's type is `boolean`\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `boolean`\n */\nexport const isBoolean = (value: unknown): value is boolean => {\n try {\n return (\n value instanceof Boolean ||\n typeof value === \"boolean\" ||\n Boolean(value) === value\n );\n } catch {\n return false;\n }\n};\n"],"mappings":"AAwBA,MAAa,
|
|
1
|
+
{"version":3,"file":"is-boolean.mjs","names":[],"sources":["../src/is-boolean.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * Check if the provided value's type is `boolean`\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `boolean`\n */\nexport const isBoolean = (value: unknown): value is boolean => {\n try {\n return (\n value instanceof Boolean ||\n typeof value === \"boolean\" ||\n Boolean(value) === value\n );\n } catch {\n return false;\n }\n};\n"],"mappings":";;;;;;;AAwBA,MAAa,aAAa,UAAqC;AAC7D,KAAI;AACF,SACE,iBAAiB,WACjB,OAAO,UAAU,aACjB,QAAQ,MAAM,KAAK;SAEf;AACN,SAAO"}
|
package/dist/is-buffer.cjs
CHANGED
|
@@ -1 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
//#region src/is-buffer.ts
|
|
3
|
+
const isBufferExists = typeof Buffer !== "undefined";
|
|
4
|
+
/**
|
|
5
|
+
* Check if the provided value's type is `Buffer`
|
|
6
|
+
*/
|
|
7
|
+
const isBuffer = isBufferExists ? Buffer.isBuffer.bind(Buffer) : function isBuffer$1(value) {
|
|
8
|
+
return false;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
exports.isBuffer = isBuffer;
|
|
13
|
+
exports.isBufferExists = isBufferExists;
|
package/dist/is-buffer.mjs
CHANGED
|
@@ -1,2 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/is-buffer.ts
|
|
2
|
+
const isBufferExists = typeof Buffer !== "undefined";
|
|
3
|
+
/**
|
|
4
|
+
* Check if the provided value's type is `Buffer`
|
|
5
|
+
*/
|
|
6
|
+
const isBuffer = isBufferExists ? Buffer.isBuffer.bind(Buffer) : function isBuffer$1(value) {
|
|
7
|
+
return false;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
//#endregion
|
|
11
|
+
export { isBuffer, isBufferExists };
|
|
2
12
|
//# sourceMappingURL=is-buffer.mjs.map
|
package/dist/is-buffer.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-buffer.mjs","names":["isBuffer: typeof Buffer.isBuffer","isBuffer"],"sources":["../src/is-buffer.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const isBufferExists = typeof Buffer !== \"undefined\";\n\n/**\n * Check if the provided value's type is `Buffer`\n */\nexport const isBuffer: typeof Buffer.isBuffer = isBufferExists\n ? Buffer.isBuffer.bind(Buffer)\n : /**\n * Check if the provided value's type is `Buffer`\n\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `Buffer`\n */\n function isBuffer(\n value: Parameters<typeof Buffer.isBuffer>[0]\n ): value is Buffer {\n return false;\n };\n"],"mappings":"AAkBA,MAAa,
|
|
1
|
+
{"version":3,"file":"is-buffer.mjs","names":["isBuffer: typeof Buffer.isBuffer","isBuffer"],"sources":["../src/is-buffer.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const isBufferExists = typeof Buffer !== \"undefined\";\n\n/**\n * Check if the provided value's type is `Buffer`\n */\nexport const isBuffer: typeof Buffer.isBuffer = isBufferExists\n ? Buffer.isBuffer.bind(Buffer)\n : /**\n * Check if the provided value's type is `Buffer`\n\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `Buffer`\n */\n function isBuffer(\n value: Parameters<typeof Buffer.isBuffer>[0]\n ): value is Buffer {\n return false;\n };\n"],"mappings":";AAkBA,MAAa,iBAAiB,OAAO,WAAW;;;;AAKhD,MAAaA,WAAmC,iBAC5C,OAAO,SAAS,KAAK,OAAO,GAO5B,SAASC,WACP,OACiB;AACjB,QAAO"}
|
package/dist/is-collection.cjs
CHANGED
|
@@ -1 +1,22 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_type_detect = require('./type-detect.cjs');
|
|
2
|
+
|
|
3
|
+
//#region src/is-collection.ts
|
|
4
|
+
const COLLECTION_TYPE_SET = new Set([
|
|
5
|
+
"Arguments",
|
|
6
|
+
"Array",
|
|
7
|
+
"Map",
|
|
8
|
+
"Object",
|
|
9
|
+
"Set"
|
|
10
|
+
]);
|
|
11
|
+
/**
|
|
12
|
+
* Check if the provided value's type is `Collection`
|
|
13
|
+
*
|
|
14
|
+
* @param value - The value to type check
|
|
15
|
+
* @returns An indicator specifying if the value provided is of type `Collection`
|
|
16
|
+
*/
|
|
17
|
+
function isCollection(value) {
|
|
18
|
+
return COLLECTION_TYPE_SET.has(require_type_detect.typeDetect(value));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
exports.isCollection = isCollection;
|
package/dist/is-collection.mjs
CHANGED
|
@@ -1,2 +1,23 @@
|
|
|
1
|
-
import{typeDetect
|
|
1
|
+
import { typeDetect } from "./type-detect.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/is-collection.ts
|
|
4
|
+
const COLLECTION_TYPE_SET = new Set([
|
|
5
|
+
"Arguments",
|
|
6
|
+
"Array",
|
|
7
|
+
"Map",
|
|
8
|
+
"Object",
|
|
9
|
+
"Set"
|
|
10
|
+
]);
|
|
11
|
+
/**
|
|
12
|
+
* Check if the provided value's type is `Collection`
|
|
13
|
+
*
|
|
14
|
+
* @param value - The value to type check
|
|
15
|
+
* @returns An indicator specifying if the value provided is of type `Collection`
|
|
16
|
+
*/
|
|
17
|
+
function isCollection(value) {
|
|
18
|
+
return COLLECTION_TYPE_SET.has(typeDetect(value));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
export { isCollection };
|
|
2
23
|
//# sourceMappingURL=is-collection.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-collection.mjs","names":[],"sources":["../src/is-collection.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { Collection } from \"@stryke/types/base\";\nimport { typeDetect } from \"./type-detect\";\n\nconst COLLECTION_TYPE_SET = new Set([\n \"Arguments\",\n \"Array\",\n \"Map\",\n \"Object\",\n \"Set\"\n]);\n\n/**\n * Check if the provided value's type is `Collection`\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `Collection`\n */\nexport function isCollection(value: any): value is Collection {\n return COLLECTION_TYPE_SET.has(typeDetect(value));\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"is-collection.mjs","names":[],"sources":["../src/is-collection.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { Collection } from \"@stryke/types/base\";\nimport { typeDetect } from \"./type-detect\";\n\nconst COLLECTION_TYPE_SET = new Set([\n \"Arguments\",\n \"Array\",\n \"Map\",\n \"Object\",\n \"Set\"\n]);\n\n/**\n * Check if the provided value's type is `Collection`\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `Collection`\n */\nexport function isCollection(value: any): value is Collection {\n return COLLECTION_TYPE_SET.has(typeDetect(value));\n}\n"],"mappings":";;;AAqBA,MAAM,sBAAsB,IAAI,IAAI;CAClC;CACA;CACA;CACA;CACA;CACD,CAAC;;;;;;;AAQF,SAAgB,aAAa,OAAiC;AAC5D,QAAO,oBAAoB,IAAI,WAAW,MAAM,CAAC"}
|
package/dist/is-date.cjs
CHANGED
|
@@ -1 +1,23 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_get_object_tag = require('./get-object-tag.cjs');
|
|
2
|
+
const require_is_plain_object = require('./is-plain-object.cjs');
|
|
3
|
+
|
|
4
|
+
//#region src/is-date.ts
|
|
5
|
+
/**
|
|
6
|
+
* Checks if `value` is classified as a `Date` object.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* isDate(new Date)
|
|
11
|
+
* // => true
|
|
12
|
+
*
|
|
13
|
+
* isDate('Mon April 23 2012')
|
|
14
|
+
* // => false
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* @param value - The value to check.
|
|
18
|
+
* @returns Returns `true` if `obj` is a date object, else `false`.
|
|
19
|
+
*/
|
|
20
|
+
const isDate = (value) => require_is_plain_object.isObjectLike(value) && require_get_object_tag.getObjectTag(value) == "[object Date]";
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
exports.isDate = isDate;
|
package/dist/is-date.mjs
CHANGED
|
@@ -1,2 +1,24 @@
|
|
|
1
|
-
import{getObjectTag
|
|
1
|
+
import { getObjectTag } from "./get-object-tag.mjs";
|
|
2
|
+
import { isObjectLike } from "./is-plain-object.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/is-date.ts
|
|
5
|
+
/**
|
|
6
|
+
* Checks if `value` is classified as a `Date` object.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* isDate(new Date)
|
|
11
|
+
* // => true
|
|
12
|
+
*
|
|
13
|
+
* isDate('Mon April 23 2012')
|
|
14
|
+
* // => false
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* @param value - The value to check.
|
|
18
|
+
* @returns Returns `true` if `obj` is a date object, else `false`.
|
|
19
|
+
*/
|
|
20
|
+
const isDate = (value) => isObjectLike(value) && getObjectTag(value) == "[object Date]";
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
export { isDate };
|
|
2
24
|
//# sourceMappingURL=is-date.mjs.map
|
package/dist/is-date.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-date.mjs","names":[],"sources":["../src/is-date.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { getObjectTag } from \"./get-object-tag\";\nimport { isObjectLike } from \"./is-plain-object\";\n\n/**\n * Checks if `value` is classified as a `Date` object.\n *\n * @example\n * ```typescript\n * isDate(new Date)\n * // => true\n *\n * isDate('Mon April 23 2012')\n * // => false\n * ```\n *\n * @param value - The value to check.\n * @returns Returns `true` if `obj` is a date object, else `false`.\n */\nexport const isDate = (value: unknown): value is Date =>\n isObjectLike(value) && getObjectTag(value) == \"[object Date]\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"is-date.mjs","names":[],"sources":["../src/is-date.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { getObjectTag } from \"./get-object-tag\";\nimport { isObjectLike } from \"./is-plain-object\";\n\n/**\n * Checks if `value` is classified as a `Date` object.\n *\n * @example\n * ```typescript\n * isDate(new Date)\n * // => true\n *\n * isDate('Mon April 23 2012')\n * // => false\n * ```\n *\n * @param value - The value to check.\n * @returns Returns `true` if `obj` is a date object, else `false`.\n */\nexport const isDate = (value: unknown): value is Date =>\n isObjectLike(value) && getObjectTag(value) == \"[object Date]\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAoCA,MAAa,UAAU,UACrB,aAAa,MAAM,IAAI,aAAa,MAAM,IAAI"}
|