@ntnyq/utils 0.4.3 → 0.4.4
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/dist/index.cjs +10 -0
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +8 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -41,6 +41,7 @@ __export(index_exports, {
|
|
|
41
41
|
interopDefault: () => interopDefault,
|
|
42
42
|
isArray: () => isArray,
|
|
43
43
|
isArrayEqual: () => isArrayEqual,
|
|
44
|
+
isBigInt: () => isBigInt,
|
|
44
45
|
isBoolean: () => isBoolean,
|
|
45
46
|
isBrowser: () => isBrowser,
|
|
46
47
|
isDeepEqual: () => isDeepEqual,
|
|
@@ -48,6 +49,7 @@ __export(index_exports, {
|
|
|
48
49
|
isEmptyObject: () => isEmptyObject,
|
|
49
50
|
isEmptyString: () => isEmptyString,
|
|
50
51
|
isEmptyStringOrWhitespace: () => isEmptyStringOrWhitespace,
|
|
52
|
+
isError: () => isError,
|
|
51
53
|
isFunction: () => isFunction,
|
|
52
54
|
isInteger: () => isInteger,
|
|
53
55
|
isNaN: () => isNaN,
|
|
@@ -164,6 +166,9 @@ function isNumbericString(value) {
|
|
|
164
166
|
function isInteger(value) {
|
|
165
167
|
return Number.isInteger(value);
|
|
166
168
|
}
|
|
169
|
+
function isBigInt(value) {
|
|
170
|
+
return typeof value === "bigint";
|
|
171
|
+
}
|
|
167
172
|
function isBoolean(value) {
|
|
168
173
|
return typeof value === "boolean";
|
|
169
174
|
}
|
|
@@ -185,6 +190,9 @@ function isEmptyObject(value) {
|
|
|
185
190
|
function isRegExp(value) {
|
|
186
191
|
return getObjectType(value) === "RegExp";
|
|
187
192
|
}
|
|
193
|
+
function isError(value) {
|
|
194
|
+
return getObjectType(value) === "Error";
|
|
195
|
+
}
|
|
188
196
|
function isSet(value) {
|
|
189
197
|
return getObjectType(value) === "Set";
|
|
190
198
|
}
|
|
@@ -650,6 +658,7 @@ function resolveSubOptions(options, key) {
|
|
|
650
658
|
interopDefault,
|
|
651
659
|
isArray,
|
|
652
660
|
isArrayEqual,
|
|
661
|
+
isBigInt,
|
|
653
662
|
isBoolean,
|
|
654
663
|
isBrowser,
|
|
655
664
|
isDeepEqual,
|
|
@@ -657,6 +666,7 @@ function resolveSubOptions(options, key) {
|
|
|
657
666
|
isEmptyObject,
|
|
658
667
|
isEmptyString,
|
|
659
668
|
isEmptyStringOrWhitespace,
|
|
669
|
+
isError,
|
|
660
670
|
isFunction,
|
|
661
671
|
isInteger,
|
|
662
672
|
isNaN,
|
package/dist/index.d.cts
CHANGED
|
@@ -29,6 +29,7 @@ declare function isWhitespaceString(value: unknown): value is Whitespace;
|
|
|
29
29
|
declare function isEmptyStringOrWhitespace(value: unknown): value is '' | Whitespace;
|
|
30
30
|
declare function isNumbericString(value: unknown): value is `${number}`;
|
|
31
31
|
declare function isInteger(value: unknown): value is number;
|
|
32
|
+
declare function isBigInt(value: unknown): value is bigint;
|
|
32
33
|
declare function isBoolean(value: unknown): value is boolean;
|
|
33
34
|
declare function isFunction(value: unknown): value is Function;
|
|
34
35
|
declare function isArray(value: unknown): value is unknown[];
|
|
@@ -36,6 +37,7 @@ declare function isEmptyArray(value: unknown): value is [];
|
|
|
36
37
|
declare function isObject(value: unknown): value is object;
|
|
37
38
|
declare function isEmptyObject(value: unknown): value is {};
|
|
38
39
|
declare function isRegExp(value: unknown): value is RegExp;
|
|
40
|
+
declare function isError(value: unknown): value is Error;
|
|
39
41
|
declare function isSet<Value = unknown>(value: unknown): value is Set<Value>;
|
|
40
42
|
declare function isNativePromise<T = unknown>(value: unknown): value is Promise<T>;
|
|
41
43
|
declare function isPromise<T = unknown>(value: unknown): value is Promise<T>;
|
|
@@ -420,4 +422,4 @@ declare function interopDefault<T>(mod: Awaitable<T>): Promise<InteropModuleDefa
|
|
|
420
422
|
*/
|
|
421
423
|
declare function resolveSubOptions<T extends Record<string, any>, K extends keyof T>(options: T, key: K): Partial<ResolvedOptions<T[K]>>;
|
|
422
424
|
|
|
423
|
-
export { type AnyFn, type Arrayable, type Awaitable, type Callable, type CleanObjectOptions, type InteropModuleDefault, type JsonArray, type JsonObject, type JsonPrimitive, type JsonValue, type MayBe, NOOP, type NonEmptyString, type Nullable, type Overwrite, type Prettify, type PrettifyV2, type PrimitiveType, type ResolvedOptions, type SortObjectOptions, type ThrottleDebounceOptions, type Whitespace, at, cAF, capitalize, chunk, clamp, cleanObject, days, debounce, ensurePrefix, ensureSuffix, escapeHtml, flattenArrayable, getObjectType, hasOwn, hours, interopDefault, isArray, isArrayEqual, isBoolean, isBrowser, isDeepEqual, isEmptyArray, isEmptyObject, isEmptyString, isEmptyStringOrWhitespace, isFunction, isInteger, isNaN, isNativePromise, isNil, isNonEmptyString, isNull, isNumber, isNumbericString, isObject, isPromise, isRegExp, isSet, isString, isUndefined, isWhitespaceString, isZero, join, last, mergeArrayable, minutes, noop, omit, once, pick, rAF, resolveSubOptions, seconds, slash, sortObject, throttle, toArray, unindent, unique, uniqueBy, waitFor, warnOnce, weeks };
|
|
425
|
+
export { type AnyFn, type Arrayable, type Awaitable, type Callable, type CleanObjectOptions, type InteropModuleDefault, type JsonArray, type JsonObject, type JsonPrimitive, type JsonValue, type MayBe, NOOP, type NonEmptyString, type Nullable, type Overwrite, type Prettify, type PrettifyV2, type PrimitiveType, type ResolvedOptions, type SortObjectOptions, type ThrottleDebounceOptions, type Whitespace, at, cAF, capitalize, chunk, clamp, cleanObject, days, debounce, ensurePrefix, ensureSuffix, escapeHtml, flattenArrayable, getObjectType, hasOwn, hours, interopDefault, isArray, isArrayEqual, isBigInt, isBoolean, isBrowser, isDeepEqual, isEmptyArray, isEmptyObject, isEmptyString, isEmptyStringOrWhitespace, isError, isFunction, isInteger, isNaN, isNativePromise, isNil, isNonEmptyString, isNull, isNumber, isNumbericString, isObject, isPromise, isRegExp, isSet, isString, isUndefined, isWhitespaceString, isZero, join, last, mergeArrayable, minutes, noop, omit, once, pick, rAF, resolveSubOptions, seconds, slash, sortObject, throttle, toArray, unindent, unique, uniqueBy, waitFor, warnOnce, weeks };
|
package/dist/index.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ declare function isWhitespaceString(value: unknown): value is Whitespace;
|
|
|
29
29
|
declare function isEmptyStringOrWhitespace(value: unknown): value is '' | Whitespace;
|
|
30
30
|
declare function isNumbericString(value: unknown): value is `${number}`;
|
|
31
31
|
declare function isInteger(value: unknown): value is number;
|
|
32
|
+
declare function isBigInt(value: unknown): value is bigint;
|
|
32
33
|
declare function isBoolean(value: unknown): value is boolean;
|
|
33
34
|
declare function isFunction(value: unknown): value is Function;
|
|
34
35
|
declare function isArray(value: unknown): value is unknown[];
|
|
@@ -36,6 +37,7 @@ declare function isEmptyArray(value: unknown): value is [];
|
|
|
36
37
|
declare function isObject(value: unknown): value is object;
|
|
37
38
|
declare function isEmptyObject(value: unknown): value is {};
|
|
38
39
|
declare function isRegExp(value: unknown): value is RegExp;
|
|
40
|
+
declare function isError(value: unknown): value is Error;
|
|
39
41
|
declare function isSet<Value = unknown>(value: unknown): value is Set<Value>;
|
|
40
42
|
declare function isNativePromise<T = unknown>(value: unknown): value is Promise<T>;
|
|
41
43
|
declare function isPromise<T = unknown>(value: unknown): value is Promise<T>;
|
|
@@ -420,4 +422,4 @@ declare function interopDefault<T>(mod: Awaitable<T>): Promise<InteropModuleDefa
|
|
|
420
422
|
*/
|
|
421
423
|
declare function resolveSubOptions<T extends Record<string, any>, K extends keyof T>(options: T, key: K): Partial<ResolvedOptions<T[K]>>;
|
|
422
424
|
|
|
423
|
-
export { type AnyFn, type Arrayable, type Awaitable, type Callable, type CleanObjectOptions, type InteropModuleDefault, type JsonArray, type JsonObject, type JsonPrimitive, type JsonValue, type MayBe, NOOP, type NonEmptyString, type Nullable, type Overwrite, type Prettify, type PrettifyV2, type PrimitiveType, type ResolvedOptions, type SortObjectOptions, type ThrottleDebounceOptions, type Whitespace, at, cAF, capitalize, chunk, clamp, cleanObject, days, debounce, ensurePrefix, ensureSuffix, escapeHtml, flattenArrayable, getObjectType, hasOwn, hours, interopDefault, isArray, isArrayEqual, isBoolean, isBrowser, isDeepEqual, isEmptyArray, isEmptyObject, isEmptyString, isEmptyStringOrWhitespace, isFunction, isInteger, isNaN, isNativePromise, isNil, isNonEmptyString, isNull, isNumber, isNumbericString, isObject, isPromise, isRegExp, isSet, isString, isUndefined, isWhitespaceString, isZero, join, last, mergeArrayable, minutes, noop, omit, once, pick, rAF, resolveSubOptions, seconds, slash, sortObject, throttle, toArray, unindent, unique, uniqueBy, waitFor, warnOnce, weeks };
|
|
425
|
+
export { type AnyFn, type Arrayable, type Awaitable, type Callable, type CleanObjectOptions, type InteropModuleDefault, type JsonArray, type JsonObject, type JsonPrimitive, type JsonValue, type MayBe, NOOP, type NonEmptyString, type Nullable, type Overwrite, type Prettify, type PrettifyV2, type PrimitiveType, type ResolvedOptions, type SortObjectOptions, type ThrottleDebounceOptions, type Whitespace, at, cAF, capitalize, chunk, clamp, cleanObject, days, debounce, ensurePrefix, ensureSuffix, escapeHtml, flattenArrayable, getObjectType, hasOwn, hours, interopDefault, isArray, isArrayEqual, isBigInt, isBoolean, isBrowser, isDeepEqual, isEmptyArray, isEmptyObject, isEmptyString, isEmptyStringOrWhitespace, isError, isFunction, isInteger, isNaN, isNativePromise, isNil, isNonEmptyString, isNull, isNumber, isNumbericString, isObject, isPromise, isRegExp, isSet, isString, isUndefined, isWhitespaceString, isZero, join, last, mergeArrayable, minutes, noop, omit, once, pick, rAF, resolveSubOptions, seconds, slash, sortObject, throttle, toArray, unindent, unique, uniqueBy, waitFor, warnOnce, weeks };
|
package/dist/index.js
CHANGED
|
@@ -64,6 +64,9 @@ function isNumbericString(value) {
|
|
|
64
64
|
function isInteger(value) {
|
|
65
65
|
return Number.isInteger(value);
|
|
66
66
|
}
|
|
67
|
+
function isBigInt(value) {
|
|
68
|
+
return typeof value === "bigint";
|
|
69
|
+
}
|
|
67
70
|
function isBoolean(value) {
|
|
68
71
|
return typeof value === "boolean";
|
|
69
72
|
}
|
|
@@ -85,6 +88,9 @@ function isEmptyObject(value) {
|
|
|
85
88
|
function isRegExp(value) {
|
|
86
89
|
return getObjectType(value) === "RegExp";
|
|
87
90
|
}
|
|
91
|
+
function isError(value) {
|
|
92
|
+
return getObjectType(value) === "Error";
|
|
93
|
+
}
|
|
88
94
|
function isSet(value) {
|
|
89
95
|
return getObjectType(value) === "Set";
|
|
90
96
|
}
|
|
@@ -549,6 +555,7 @@ export {
|
|
|
549
555
|
interopDefault,
|
|
550
556
|
isArray,
|
|
551
557
|
isArrayEqual,
|
|
558
|
+
isBigInt,
|
|
552
559
|
isBoolean,
|
|
553
560
|
isBrowser,
|
|
554
561
|
isDeepEqual,
|
|
@@ -556,6 +563,7 @@ export {
|
|
|
556
563
|
isEmptyObject,
|
|
557
564
|
isEmptyString,
|
|
558
565
|
isEmptyStringOrWhitespace,
|
|
566
|
+
isError,
|
|
559
567
|
isFunction,
|
|
560
568
|
isInteger,
|
|
561
569
|
isNaN,
|