Criada a API do site
This commit is contained in:
2
node_modules/is-what/dist/getType.d.ts
generated
vendored
Normal file
2
node_modules/is-what/dist/getType.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/** Returns the object type of the given payload */
|
||||
export declare function getType(payload: unknown): string;
|
||||
4
node_modules/is-what/dist/getType.js
generated
vendored
Normal file
4
node_modules/is-what/dist/getType.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
/** Returns the object type of the given payload */
|
||||
export function getType(payload) {
|
||||
return Object.prototype.toString.call(payload).slice(8, -1);
|
||||
}
|
||||
47
node_modules/is-what/dist/index.d.ts
generated
vendored
Normal file
47
node_modules/is-what/dist/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
export type AnyAsyncFunction = (...args: unknown[]) => Promise<unknown>;
|
||||
export { getType } from './getType.js';
|
||||
export { isAnyObject } from './isAnyObject.js';
|
||||
export { isArray } from './isArray.js';
|
||||
export { isBigInt } from './isBigInt.js';
|
||||
export { isBlob } from './isBlob.js';
|
||||
export { isBoolean } from './isBoolean.js';
|
||||
export { isDate } from './isDate.js';
|
||||
export { isEmptyArray } from './isEmptyArray.js';
|
||||
export { isEmptyObject } from './isEmptyObject.js';
|
||||
export { isEmptyString } from './isEmptyString.js';
|
||||
export { isError } from './isError.js';
|
||||
export { isFile } from './isFile.js';
|
||||
export { isFullArray } from './isFullArray.js';
|
||||
export { isFullObject } from './isFullObject.js';
|
||||
export { isFullString } from './isFullString.js';
|
||||
export { isFunction } from './isFunction.js';
|
||||
export type { AnyFunction } from './isFunction.js';
|
||||
export { isHexDecimal } from './isHexDecimal.js';
|
||||
export { isInstanceOf } from './isInstanceOf.js';
|
||||
export { isInteger } from './isInteger.js';
|
||||
export { isIterable } from './isIterable.js';
|
||||
export { isMap } from './isMap.js';
|
||||
export { isNaNValue } from './isNaNValue.js';
|
||||
export { isNegativeInteger } from './isNegativeInteger.js';
|
||||
export { isNegativeNumber } from './isNegativeNumber.js';
|
||||
export { isNull } from './isNull.js';
|
||||
export { isNullOrUndefined } from './isNullOrUndefined.js';
|
||||
export { isNumber } from './isNumber.js';
|
||||
export { isObject } from './isObject.js';
|
||||
export { isObjectLike } from './isObjectLike.js';
|
||||
export { isOneOf } from './isOneOf.js';
|
||||
export { isPlainObject } from './isPlainObject.js';
|
||||
export type { PlainObject } from './isPlainObject.js';
|
||||
export { isPositiveInteger } from './isPositiveInteger.js';
|
||||
export { isPositiveNumber } from './isPositiveNumber.js';
|
||||
export { isPrimitive } from './isPrimitive.js';
|
||||
export { isPromise } from './isPromise.js';
|
||||
export { isRegExp } from './isRegExp.js';
|
||||
export { isSet } from './isSet.js';
|
||||
export { isString } from './isString.js';
|
||||
export { isSymbol } from './isSymbol.js';
|
||||
export { isType } from './isType.js';
|
||||
export type { AnyClass } from './isType.js';
|
||||
export { isUndefined } from './isUndefined.js';
|
||||
export { isWeakMap } from './isWeakMap.js';
|
||||
export { isWeakSet } from './isWeakSet.js';
|
||||
43
node_modules/is-what/dist/index.js
generated
vendored
Normal file
43
node_modules/is-what/dist/index.js
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
export { getType } from './getType.js';
|
||||
export { isAnyObject } from './isAnyObject.js';
|
||||
export { isArray } from './isArray.js';
|
||||
export { isBigInt } from './isBigInt.js';
|
||||
export { isBlob } from './isBlob.js';
|
||||
export { isBoolean } from './isBoolean.js';
|
||||
export { isDate } from './isDate.js';
|
||||
export { isEmptyArray } from './isEmptyArray.js';
|
||||
export { isEmptyObject } from './isEmptyObject.js';
|
||||
export { isEmptyString } from './isEmptyString.js';
|
||||
export { isError } from './isError.js';
|
||||
export { isFile } from './isFile.js';
|
||||
export { isFullArray } from './isFullArray.js';
|
||||
export { isFullObject } from './isFullObject.js';
|
||||
export { isFullString } from './isFullString.js';
|
||||
export { isFunction } from './isFunction.js';
|
||||
export { isHexDecimal } from './isHexDecimal.js';
|
||||
export { isInstanceOf } from './isInstanceOf.js';
|
||||
export { isInteger } from './isInteger.js';
|
||||
export { isIterable } from './isIterable.js';
|
||||
export { isMap } from './isMap.js';
|
||||
export { isNaNValue } from './isNaNValue.js';
|
||||
export { isNegativeInteger } from './isNegativeInteger.js';
|
||||
export { isNegativeNumber } from './isNegativeNumber.js';
|
||||
export { isNull } from './isNull.js';
|
||||
export { isNullOrUndefined } from './isNullOrUndefined.js';
|
||||
export { isNumber } from './isNumber.js';
|
||||
export { isObject } from './isObject.js';
|
||||
export { isObjectLike } from './isObjectLike.js';
|
||||
export { isOneOf } from './isOneOf.js';
|
||||
export { isPlainObject } from './isPlainObject.js';
|
||||
export { isPositiveInteger } from './isPositiveInteger.js';
|
||||
export { isPositiveNumber } from './isPositiveNumber.js';
|
||||
export { isPrimitive } from './isPrimitive.js';
|
||||
export { isPromise } from './isPromise.js';
|
||||
export { isRegExp } from './isRegExp.js';
|
||||
export { isSet } from './isSet.js';
|
||||
export { isString } from './isString.js';
|
||||
export { isSymbol } from './isSymbol.js';
|
||||
export { isType } from './isType.js';
|
||||
export { isUndefined } from './isUndefined.js';
|
||||
export { isWeakMap } from './isWeakMap.js';
|
||||
export { isWeakSet } from './isWeakSet.js';
|
||||
6
node_modules/is-what/dist/isAnyObject.d.ts
generated
vendored
Normal file
6
node_modules/is-what/dist/isAnyObject.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import type { PlainObject } from './isPlainObject.js';
|
||||
/**
|
||||
* Returns whether the payload is an any kind of object (including special classes or objects with
|
||||
* different prototypes)
|
||||
*/
|
||||
export declare function isAnyObject(payload: unknown): payload is PlainObject;
|
||||
8
node_modules/is-what/dist/isAnyObject.js
generated
vendored
Normal file
8
node_modules/is-what/dist/isAnyObject.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import { getType } from './getType.js';
|
||||
/**
|
||||
* Returns whether the payload is an any kind of object (including special classes or objects with
|
||||
* different prototypes)
|
||||
*/
|
||||
export function isAnyObject(payload) {
|
||||
return getType(payload) === 'Object';
|
||||
}
|
||||
2
node_modules/is-what/dist/isArray.d.ts
generated
vendored
Normal file
2
node_modules/is-what/dist/isArray.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/** Returns whether the payload is an array */
|
||||
export declare function isArray(payload: unknown): payload is unknown[];
|
||||
5
node_modules/is-what/dist/isArray.js
generated
vendored
Normal file
5
node_modules/is-what/dist/isArray.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { getType } from './getType.js';
|
||||
/** Returns whether the payload is an array */
|
||||
export function isArray(payload) {
|
||||
return getType(payload) === 'Array';
|
||||
}
|
||||
2
node_modules/is-what/dist/isBigInt.d.ts
generated
vendored
Normal file
2
node_modules/is-what/dist/isBigInt.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/** Returns whether the payload is a bigint */
|
||||
export declare function isBigInt(payload: unknown): payload is bigint;
|
||||
5
node_modules/is-what/dist/isBigInt.js
generated
vendored
Normal file
5
node_modules/is-what/dist/isBigInt.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { getType } from './getType.js';
|
||||
/** Returns whether the payload is a bigint */
|
||||
export function isBigInt(payload) {
|
||||
return getType(payload) === 'BigInt';
|
||||
}
|
||||
2
node_modules/is-what/dist/isBlob.d.ts
generated
vendored
Normal file
2
node_modules/is-what/dist/isBlob.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/** Returns whether the payload is a Blob */
|
||||
export declare function isBlob(payload: unknown): payload is Blob;
|
||||
5
node_modules/is-what/dist/isBlob.js
generated
vendored
Normal file
5
node_modules/is-what/dist/isBlob.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { getType } from './getType.js';
|
||||
/** Returns whether the payload is a Blob */
|
||||
export function isBlob(payload) {
|
||||
return getType(payload) === 'Blob';
|
||||
}
|
||||
2
node_modules/is-what/dist/isBoolean.d.ts
generated
vendored
Normal file
2
node_modules/is-what/dist/isBoolean.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/** Returns whether the payload is a boolean */
|
||||
export declare function isBoolean(payload: unknown): payload is boolean;
|
||||
5
node_modules/is-what/dist/isBoolean.js
generated
vendored
Normal file
5
node_modules/is-what/dist/isBoolean.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { getType } from './getType.js';
|
||||
/** Returns whether the payload is a boolean */
|
||||
export function isBoolean(payload) {
|
||||
return getType(payload) === 'Boolean';
|
||||
}
|
||||
2
node_modules/is-what/dist/isDate.d.ts
generated
vendored
Normal file
2
node_modules/is-what/dist/isDate.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/** Returns whether the payload is a Date, and that the date is valid */
|
||||
export declare function isDate(payload: unknown): payload is Date;
|
||||
5
node_modules/is-what/dist/isDate.js
generated
vendored
Normal file
5
node_modules/is-what/dist/isDate.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { getType } from './getType.js';
|
||||
/** Returns whether the payload is a Date, and that the date is valid */
|
||||
export function isDate(payload) {
|
||||
return getType(payload) === 'Date' && !Number.isNaN(payload.valueOf());
|
||||
}
|
||||
2
node_modules/is-what/dist/isEmptyArray.d.ts
generated
vendored
Normal file
2
node_modules/is-what/dist/isEmptyArray.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/** Returns whether the payload is a an empty array */
|
||||
export declare function isEmptyArray(payload: unknown): payload is [];
|
||||
5
node_modules/is-what/dist/isEmptyArray.js
generated
vendored
Normal file
5
node_modules/is-what/dist/isEmptyArray.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { isArray } from './isArray.js';
|
||||
/** Returns whether the payload is a an empty array */
|
||||
export function isEmptyArray(payload) {
|
||||
return isArray(payload) && payload.length === 0;
|
||||
}
|
||||
7
node_modules/is-what/dist/isEmptyObject.d.ts
generated
vendored
Normal file
7
node_modules/is-what/dist/isEmptyObject.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* Returns whether the payload is a an empty object (excluding special classes or objects with other
|
||||
* prototypes)
|
||||
*/
|
||||
export declare function isEmptyObject(payload: unknown): payload is {
|
||||
[K in string | symbol | number]: never;
|
||||
};
|
||||
8
node_modules/is-what/dist/isEmptyObject.js
generated
vendored
Normal file
8
node_modules/is-what/dist/isEmptyObject.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import { isPlainObject } from './isPlainObject.js';
|
||||
/**
|
||||
* Returns whether the payload is a an empty object (excluding special classes or objects with other
|
||||
* prototypes)
|
||||
*/
|
||||
export function isEmptyObject(payload) {
|
||||
return isPlainObject(payload) && Object.keys(payload).length === 0;
|
||||
}
|
||||
2
node_modules/is-what/dist/isEmptyString.d.ts
generated
vendored
Normal file
2
node_modules/is-what/dist/isEmptyString.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/** Returns whether the payload is '' */
|
||||
export declare function isEmptyString(payload: unknown): payload is string;
|
||||
4
node_modules/is-what/dist/isEmptyString.js
generated
vendored
Normal file
4
node_modules/is-what/dist/isEmptyString.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
/** Returns whether the payload is '' */
|
||||
export function isEmptyString(payload) {
|
||||
return payload === '';
|
||||
}
|
||||
2
node_modules/is-what/dist/isError.d.ts
generated
vendored
Normal file
2
node_modules/is-what/dist/isError.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/** Returns whether the payload is an Error */
|
||||
export declare function isError(payload: unknown): payload is Error;
|
||||
5
node_modules/is-what/dist/isError.js
generated
vendored
Normal file
5
node_modules/is-what/dist/isError.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { getType } from './getType.js';
|
||||
/** Returns whether the payload is an Error */
|
||||
export function isError(payload) {
|
||||
return getType(payload) === 'Error' || payload instanceof Error;
|
||||
}
|
||||
2
node_modules/is-what/dist/isFile.d.ts
generated
vendored
Normal file
2
node_modules/is-what/dist/isFile.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/** Returns whether the payload is a File */
|
||||
export declare function isFile(payload: unknown): payload is File;
|
||||
5
node_modules/is-what/dist/isFile.js
generated
vendored
Normal file
5
node_modules/is-what/dist/isFile.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { getType } from './getType.js';
|
||||
/** Returns whether the payload is a File */
|
||||
export function isFile(payload) {
|
||||
return getType(payload) === 'File';
|
||||
}
|
||||
2
node_modules/is-what/dist/isFullArray.d.ts
generated
vendored
Normal file
2
node_modules/is-what/dist/isFullArray.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/** Returns whether the payload is a an array with at least 1 item */
|
||||
export declare function isFullArray(payload: unknown): payload is unknown[];
|
||||
5
node_modules/is-what/dist/isFullArray.js
generated
vendored
Normal file
5
node_modules/is-what/dist/isFullArray.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { isArray } from './isArray.js';
|
||||
/** Returns whether the payload is a an array with at least 1 item */
|
||||
export function isFullArray(payload) {
|
||||
return isArray(payload) && payload.length > 0;
|
||||
}
|
||||
6
node_modules/is-what/dist/isFullObject.d.ts
generated
vendored
Normal file
6
node_modules/is-what/dist/isFullObject.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import type { PlainObject } from './isPlainObject.js';
|
||||
/**
|
||||
* Returns whether the payload is a an empty object (excluding special classes or objects with other
|
||||
* prototypes)
|
||||
*/
|
||||
export declare function isFullObject(payload: unknown): payload is PlainObject;
|
||||
8
node_modules/is-what/dist/isFullObject.js
generated
vendored
Normal file
8
node_modules/is-what/dist/isFullObject.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import { isPlainObject } from './isPlainObject.js';
|
||||
/**
|
||||
* Returns whether the payload is a an empty object (excluding special classes or objects with other
|
||||
* prototypes)
|
||||
*/
|
||||
export function isFullObject(payload) {
|
||||
return isPlainObject(payload) && Object.keys(payload).length > 0;
|
||||
}
|
||||
2
node_modules/is-what/dist/isFullString.d.ts
generated
vendored
Normal file
2
node_modules/is-what/dist/isFullString.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/** Returns whether the payload is a string, BUT returns false for '' */
|
||||
export declare function isFullString(payload: unknown): payload is string;
|
||||
5
node_modules/is-what/dist/isFullString.js
generated
vendored
Normal file
5
node_modules/is-what/dist/isFullString.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { isString } from './isString.js';
|
||||
/** Returns whether the payload is a string, BUT returns false for '' */
|
||||
export function isFullString(payload) {
|
||||
return isString(payload) && payload !== '';
|
||||
}
|
||||
3
node_modules/is-what/dist/isFunction.d.ts
generated
vendored
Normal file
3
node_modules/is-what/dist/isFunction.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export type AnyFunction = (...args: any[]) => any;
|
||||
/** Returns whether the payload is a function (regular or async) */
|
||||
export declare function isFunction(payload: unknown): payload is AnyFunction;
|
||||
4
node_modules/is-what/dist/isFunction.js
generated
vendored
Normal file
4
node_modules/is-what/dist/isFunction.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
/** Returns whether the payload is a function (regular or async) */
|
||||
export function isFunction(payload) {
|
||||
return typeof payload === 'function';
|
||||
}
|
||||
5
node_modules/is-what/dist/isHexDecimal.d.ts
generated
vendored
Normal file
5
node_modules/is-what/dist/isHexDecimal.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
/**
|
||||
* Checks if a string is a valid hexadecimal string. If a length is provided, it also checks that
|
||||
* the string has that length.
|
||||
*/
|
||||
export declare function isHexDecimal(payload: unknown, length?: number): payload is string;
|
||||
12
node_modules/is-what/dist/isHexDecimal.js
generated
vendored
Normal file
12
node_modules/is-what/dist/isHexDecimal.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import { isString } from './isString.js';
|
||||
/**
|
||||
* Checks if a string is a valid hexadecimal string. If a length is provided, it also checks that
|
||||
* the string has that length.
|
||||
*/
|
||||
export function isHexDecimal(payload, length) {
|
||||
if (!isString(payload))
|
||||
return false;
|
||||
if (!/^[0-9a-fA-F]+$/.test(payload))
|
||||
return false;
|
||||
return length === undefined || payload.length === length;
|
||||
}
|
||||
23
node_modules/is-what/dist/isInstanceOf.d.ts
generated
vendored
Normal file
23
node_modules/is-what/dist/isInstanceOf.d.ts
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
import type { AnyClass } from './isType.js';
|
||||
type GlobalClassName = {
|
||||
[K in keyof typeof globalThis]: (typeof globalThis)[K] extends AnyClass ? K : never;
|
||||
}[keyof typeof globalThis];
|
||||
/**
|
||||
* Checks if a value is an instance of a class or a class name. Useful when you want to check if a
|
||||
* value is an instance of a class that may not be defined in the current scope. For example, if you
|
||||
* want to check if a value is an `OffscreenCanvas` instance, you might not want to do the song and
|
||||
* dance of using `typeof OffscreenCanvas !== 'undefined'` and then shimming `OffscreenCanvas` if
|
||||
* the types aren't around.
|
||||
*
|
||||
* @example
|
||||
* if (isInstanceOf(value, 'OffscreenCanvas')) {
|
||||
* // value is an OffscreenCanvas
|
||||
* }
|
||||
*
|
||||
* @param value The value to recursively check
|
||||
* @param class_ A string or class that the value should be an instance of
|
||||
*/
|
||||
export declare function isInstanceOf<T extends AnyClass>(value: unknown, class_: T): value is T;
|
||||
export declare function isInstanceOf<K extends GlobalClassName>(value: unknown, className: K): value is (typeof globalThis)[K];
|
||||
export declare function isInstanceOf(value: unknown, className: string): value is object;
|
||||
export {};
|
||||
19
node_modules/is-what/dist/isInstanceOf.js
generated
vendored
Normal file
19
node_modules/is-what/dist/isInstanceOf.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
import { getType } from './getType.js';
|
||||
import { isType } from './isType.js';
|
||||
export function isInstanceOf(value, classOrClassName) {
|
||||
if (typeof classOrClassName === 'function') {
|
||||
for (let p = value; p; p = Object.getPrototypeOf(p)) {
|
||||
if (isType(p, classOrClassName)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (let p = value; p; p = Object.getPrototypeOf(p)) {
|
||||
if (getType(p) === classOrClassName) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
2
node_modules/is-what/dist/isInteger.d.ts
generated
vendored
Normal file
2
node_modules/is-what/dist/isInteger.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/** Returns whether the payload is an integer number */
|
||||
export declare function isInteger(payload: unknown): payload is number;
|
||||
5
node_modules/is-what/dist/isInteger.js
generated
vendored
Normal file
5
node_modules/is-what/dist/isInteger.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { getType } from './getType.js';
|
||||
/** Returns whether the payload is an integer number */
|
||||
export function isInteger(payload) {
|
||||
return getType(payload) === 'Number' && Number.isInteger(payload);
|
||||
}
|
||||
2
node_modules/is-what/dist/isIterable.d.ts
generated
vendored
Normal file
2
node_modules/is-what/dist/isIterable.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/** Returns whether the payload is an iterable (regular or async) */
|
||||
export declare function isIterable(payload: unknown): payload is Iterable<unknown>;
|
||||
16
node_modules/is-what/dist/isIterable.js
generated
vendored
Normal file
16
node_modules/is-what/dist/isIterable.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/** Returns whether the payload is an iterable (regular or async) */
|
||||
export function isIterable(payload) {
|
||||
// oxlint-disable-next-line no-typeof-undefined
|
||||
if (typeof Symbol === 'undefined' || typeof Symbol.iterator === 'undefined') {
|
||||
return false;
|
||||
}
|
||||
// oxlint-disable-next-line no-null
|
||||
if (payload === null || payload === undefined)
|
||||
return false;
|
||||
// Strings are iterable, even though they're primitives.
|
||||
if (typeof payload === 'string')
|
||||
return true;
|
||||
// For objects, arrays and functions, check if Symbol.iterator is a function.
|
||||
return ((typeof payload === 'object' || typeof payload === 'function') &&
|
||||
typeof payload[Symbol.iterator] === 'function');
|
||||
}
|
||||
2
node_modules/is-what/dist/isMap.d.ts
generated
vendored
Normal file
2
node_modules/is-what/dist/isMap.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/** Returns whether the payload is a Map */
|
||||
export declare function isMap(payload: unknown): payload is Map<unknown, unknown>;
|
||||
5
node_modules/is-what/dist/isMap.js
generated
vendored
Normal file
5
node_modules/is-what/dist/isMap.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { getType } from './getType.js';
|
||||
/** Returns whether the payload is a Map */
|
||||
export function isMap(payload) {
|
||||
return getType(payload) === 'Map';
|
||||
}
|
||||
2
node_modules/is-what/dist/isNaNValue.d.ts
generated
vendored
Normal file
2
node_modules/is-what/dist/isNaNValue.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/** Returns whether the payload is literally the value `NaN` (it's `NaN` and also a `number`) */
|
||||
export declare function isNaNValue(payload: unknown): payload is typeof Number.NaN;
|
||||
5
node_modules/is-what/dist/isNaNValue.js
generated
vendored
Normal file
5
node_modules/is-what/dist/isNaNValue.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { getType } from './getType.js';
|
||||
/** Returns whether the payload is literally the value `NaN` (it's `NaN` and also a `number`) */
|
||||
export function isNaNValue(payload) {
|
||||
return getType(payload) === 'Number' && Number.isNaN(payload);
|
||||
}
|
||||
2
node_modules/is-what/dist/isNegativeInteger.d.ts
generated
vendored
Normal file
2
node_modules/is-what/dist/isNegativeInteger.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/** Returns whether the payload is a negative Integer (but not 0) */
|
||||
export declare function isNegativeInteger(payload: unknown): payload is number;
|
||||
5
node_modules/is-what/dist/isNegativeInteger.js
generated
vendored
Normal file
5
node_modules/is-what/dist/isNegativeInteger.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { isInteger } from './isInteger.js';
|
||||
/** Returns whether the payload is a negative Integer (but not 0) */
|
||||
export function isNegativeInteger(payload) {
|
||||
return isInteger(payload) && payload < 0;
|
||||
}
|
||||
2
node_modules/is-what/dist/isNegativeNumber.d.ts
generated
vendored
Normal file
2
node_modules/is-what/dist/isNegativeNumber.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/** Returns whether the payload is a negative number (but not 0) */
|
||||
export declare function isNegativeNumber(payload: unknown): payload is number;
|
||||
5
node_modules/is-what/dist/isNegativeNumber.js
generated
vendored
Normal file
5
node_modules/is-what/dist/isNegativeNumber.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { isNumber } from './isNumber.js';
|
||||
/** Returns whether the payload is a negative number (but not 0) */
|
||||
export function isNegativeNumber(payload) {
|
||||
return isNumber(payload) && payload < 0;
|
||||
}
|
||||
2
node_modules/is-what/dist/isNull.d.ts
generated
vendored
Normal file
2
node_modules/is-what/dist/isNull.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/** Returns whether the payload is null */
|
||||
export declare function isNull(payload: unknown): payload is null;
|
||||
5
node_modules/is-what/dist/isNull.js
generated
vendored
Normal file
5
node_modules/is-what/dist/isNull.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { getType } from './getType.js';
|
||||
/** Returns whether the payload is null */
|
||||
export function isNull(payload) {
|
||||
return getType(payload) === 'Null';
|
||||
}
|
||||
2
node_modules/is-what/dist/isNullOrUndefined.d.ts
generated
vendored
Normal file
2
node_modules/is-what/dist/isNullOrUndefined.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/** Returns true whether the payload is null or undefined */
|
||||
export declare const isNullOrUndefined: (payload: unknown) => payload is null | undefined;
|
||||
5
node_modules/is-what/dist/isNullOrUndefined.js
generated
vendored
Normal file
5
node_modules/is-what/dist/isNullOrUndefined.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { isNull } from './isNull.js';
|
||||
import { /* tree-shaking no-side-effects-when-called */ isOneOf } from './isOneOf.js';
|
||||
import { isUndefined } from './isUndefined.js';
|
||||
/** Returns true whether the payload is null or undefined */
|
||||
export const isNullOrUndefined = isOneOf(isNull, isUndefined);
|
||||
6
node_modules/is-what/dist/isNumber.d.ts
generated
vendored
Normal file
6
node_modules/is-what/dist/isNumber.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* Returns whether the payload is a number (but not NaN)
|
||||
*
|
||||
* This will return `false` for `NaN`!!
|
||||
*/
|
||||
export declare function isNumber(payload: unknown): payload is number;
|
||||
9
node_modules/is-what/dist/isNumber.js
generated
vendored
Normal file
9
node_modules/is-what/dist/isNumber.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import { getType } from './getType.js';
|
||||
/**
|
||||
* Returns whether the payload is a number (but not NaN)
|
||||
*
|
||||
* This will return `false` for `NaN`!!
|
||||
*/
|
||||
export function isNumber(payload) {
|
||||
return getType(payload) === 'Number' && !Number.isNaN(payload);
|
||||
}
|
||||
6
node_modules/is-what/dist/isObject.d.ts
generated
vendored
Normal file
6
node_modules/is-what/dist/isObject.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import type { PlainObject } from './isPlainObject.js';
|
||||
/**
|
||||
* Returns whether the payload is a plain JavaScript object (excluding special classes or objects
|
||||
* with other prototypes)
|
||||
*/
|
||||
export declare function isObject(payload: unknown): payload is PlainObject;
|
||||
8
node_modules/is-what/dist/isObject.js
generated
vendored
Normal file
8
node_modules/is-what/dist/isObject.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import { isPlainObject } from './isPlainObject.js';
|
||||
/**
|
||||
* Returns whether the payload is a plain JavaScript object (excluding special classes or objects
|
||||
* with other prototypes)
|
||||
*/
|
||||
export function isObject(payload) {
|
||||
return isPlainObject(payload);
|
||||
}
|
||||
9
node_modules/is-what/dist/isObjectLike.d.ts
generated
vendored
Normal file
9
node_modules/is-what/dist/isObjectLike.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import type { PlainObject } from './isPlainObject.js';
|
||||
/**
|
||||
* Returns whether the payload is an object like a type passed in < >
|
||||
*
|
||||
* Usage: isObjectLike<{id: any}>(payload) // will make sure it's an object and has an `id` prop.
|
||||
*
|
||||
* @template T This must be passed in < >
|
||||
*/
|
||||
export declare function isObjectLike<T extends PlainObject>(payload: unknown): payload is T;
|
||||
11
node_modules/is-what/dist/isObjectLike.js
generated
vendored
Normal file
11
node_modules/is-what/dist/isObjectLike.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import { isAnyObject } from './isAnyObject.js';
|
||||
/**
|
||||
* Returns whether the payload is an object like a type passed in < >
|
||||
*
|
||||
* Usage: isObjectLike<{id: any}>(payload) // will make sure it's an object and has an `id` prop.
|
||||
*
|
||||
* @template T This must be passed in < >
|
||||
*/
|
||||
export function isObjectLike(payload) {
|
||||
return isAnyObject(payload);
|
||||
}
|
||||
54
node_modules/is-what/dist/isOneOf.d.ts
generated
vendored
Normal file
54
node_modules/is-what/dist/isOneOf.d.ts
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
type TypeGuard<A, B extends A> = (payload: A) => payload is B;
|
||||
/**
|
||||
* A factory function that creates a function to check if the payload is one of the given types.
|
||||
*
|
||||
* @example
|
||||
* import { isOneOf, isNull, isUndefined } from 'is-what'
|
||||
*
|
||||
* const isNullOrUndefined = isOneOf(isNull, isUndefined)
|
||||
*
|
||||
* isNullOrUndefined(null) // true
|
||||
* isNullOrUndefined(undefined) // true
|
||||
* isNullOrUndefined(123) // false
|
||||
*/
|
||||
export declare function isOneOf<A, B extends A, C extends A>(a: TypeGuard<A, B>, b: TypeGuard<A, C>): TypeGuard<A, B | C>;
|
||||
/**
|
||||
* A factory function that creates a function to check if the payload is one of the given types.
|
||||
*
|
||||
* @example
|
||||
* import { isOneOf, isNull, isUndefined } from 'is-what'
|
||||
*
|
||||
* const isNullOrUndefined = isOneOf(isNull, isUndefined)
|
||||
*
|
||||
* isNullOrUndefined(null) // true
|
||||
* isNullOrUndefined(undefined) // true
|
||||
* isNullOrUndefined(123) // false
|
||||
*/
|
||||
export declare function isOneOf<A, B extends A, C extends A, D extends A>(a: TypeGuard<A, B>, b: TypeGuard<A, C>, c: TypeGuard<A, D>): TypeGuard<A, B | C | D>;
|
||||
/**
|
||||
* A factory function that creates a function to check if the payload is one of the given types.
|
||||
*
|
||||
* @example
|
||||
* import { isOneOf, isNull, isUndefined } from 'is-what'
|
||||
*
|
||||
* const isNullOrUndefined = isOneOf(isNull, isUndefined)
|
||||
*
|
||||
* isNullOrUndefined(null) // true
|
||||
* isNullOrUndefined(undefined) // true
|
||||
* isNullOrUndefined(123) // false
|
||||
*/
|
||||
export declare function isOneOf<A, B extends A, C extends A, D extends A, E extends A>(a: TypeGuard<A, B>, b: TypeGuard<A, C>, c: TypeGuard<A, D>, d: TypeGuard<A, E>): TypeGuard<A, B | C | D | E>;
|
||||
/**
|
||||
* A factory function that creates a function to check if the payload is one of the given types.
|
||||
*
|
||||
* @example
|
||||
* import { isOneOf, isNull, isUndefined } from 'is-what'
|
||||
*
|
||||
* const isNullOrUndefined = isOneOf(isNull, isUndefined)
|
||||
*
|
||||
* isNullOrUndefined(null) // true
|
||||
* isNullOrUndefined(undefined) // true
|
||||
* isNullOrUndefined(123) // false
|
||||
*/
|
||||
export declare function isOneOf<A, B extends A, C extends A, D extends A, E extends A, F extends A>(a: TypeGuard<A, B>, b: TypeGuard<A, C>, c: TypeGuard<A, D>, d: TypeGuard<A, E>, e: TypeGuard<A, F>): TypeGuard<A, B | C | D | E | F>;
|
||||
export {};
|
||||
15
node_modules/is-what/dist/isOneOf.js
generated
vendored
Normal file
15
node_modules/is-what/dist/isOneOf.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* A factory function that creates a function to check if the payload is one of the given types.
|
||||
*
|
||||
* @example
|
||||
* import { isOneOf, isNull, isUndefined } from 'is-what'
|
||||
*
|
||||
* const isNullOrUndefined = isOneOf(isNull, isUndefined)
|
||||
*
|
||||
* isNullOrUndefined(null) // true
|
||||
* isNullOrUndefined(undefined) // true
|
||||
* isNullOrUndefined(123) // false
|
||||
*/
|
||||
export function isOneOf(a, b, c, d, e) {
|
||||
return (value) => a(value) || b(value) || (!!c && c(value)) || (!!d && d(value)) || (!!e && e(value));
|
||||
}
|
||||
8
node_modules/is-what/dist/isPlainObject.d.ts
generated
vendored
Normal file
8
node_modules/is-what/dist/isPlainObject.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
export type PlainObject = {
|
||||
[key in string | number | symbol]: unknown;
|
||||
};
|
||||
/**
|
||||
* Returns whether the payload is a plain JavaScript object (excluding special classes or objects
|
||||
* with other prototypes)
|
||||
*/
|
||||
export declare function isPlainObject(payload: unknown): payload is PlainObject;
|
||||
11
node_modules/is-what/dist/isPlainObject.js
generated
vendored
Normal file
11
node_modules/is-what/dist/isPlainObject.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import { getType } from './getType.js';
|
||||
/**
|
||||
* Returns whether the payload is a plain JavaScript object (excluding special classes or objects
|
||||
* with other prototypes)
|
||||
*/
|
||||
export function isPlainObject(payload) {
|
||||
if (getType(payload) !== 'Object')
|
||||
return false;
|
||||
const prototype = Object.getPrototypeOf(payload);
|
||||
return !!prototype && prototype.constructor === Object && prototype === Object.prototype;
|
||||
}
|
||||
2
node_modules/is-what/dist/isPositiveInteger.d.ts
generated
vendored
Normal file
2
node_modules/is-what/dist/isPositiveInteger.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/** Returns whether the payload is a positive Integer (but not 0) */
|
||||
export declare function isPositiveInteger(payload: unknown): payload is number;
|
||||
5
node_modules/is-what/dist/isPositiveInteger.js
generated
vendored
Normal file
5
node_modules/is-what/dist/isPositiveInteger.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { isInteger } from './isInteger.js';
|
||||
/** Returns whether the payload is a positive Integer (but not 0) */
|
||||
export function isPositiveInteger(payload) {
|
||||
return isInteger(payload) && payload > 0;
|
||||
}
|
||||
2
node_modules/is-what/dist/isPositiveNumber.d.ts
generated
vendored
Normal file
2
node_modules/is-what/dist/isPositiveNumber.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/** Returns whether the payload is a positive number (but not 0) */
|
||||
export declare function isPositiveNumber(payload: unknown): payload is number;
|
||||
5
node_modules/is-what/dist/isPositiveNumber.js
generated
vendored
Normal file
5
node_modules/is-what/dist/isPositiveNumber.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { isNumber } from './isNumber.js';
|
||||
/** Returns whether the payload is a positive number (but not 0) */
|
||||
export function isPositiveNumber(payload) {
|
||||
return isNumber(payload) && payload > 0;
|
||||
}
|
||||
6
node_modules/is-what/dist/isPrimitive.d.ts
generated
vendored
Normal file
6
node_modules/is-what/dist/isPrimitive.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* Returns whether the payload is a primitive type (eg. Boolean | Null | Undefined | Number | String
|
||||
*
|
||||
* | Symbol)
|
||||
*/
|
||||
export declare function isPrimitive(payload: unknown): payload is boolean | null | undefined | number | string | symbol | bigint;
|
||||
21
node_modules/is-what/dist/isPrimitive.js
generated
vendored
Normal file
21
node_modules/is-what/dist/isPrimitive.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
import { isBigInt } from './isBigInt.js';
|
||||
import { isBoolean } from './isBoolean.js';
|
||||
import { isNull } from './isNull.js';
|
||||
import { isNumber } from './isNumber.js';
|
||||
import { isString } from './isString.js';
|
||||
import { isSymbol } from './isSymbol.js';
|
||||
import { isUndefined } from './isUndefined.js';
|
||||
/**
|
||||
* Returns whether the payload is a primitive type (eg. Boolean | Null | Undefined | Number | String
|
||||
*
|
||||
* | Symbol)
|
||||
*/
|
||||
export function isPrimitive(payload) {
|
||||
return (isBoolean(payload) ||
|
||||
isNull(payload) ||
|
||||
isUndefined(payload) ||
|
||||
isNumber(payload) ||
|
||||
isString(payload) ||
|
||||
isSymbol(payload) ||
|
||||
isBigInt(payload));
|
||||
}
|
||||
2
node_modules/is-what/dist/isPromise.d.ts
generated
vendored
Normal file
2
node_modules/is-what/dist/isPromise.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/** Returns whether the payload is a Promise */
|
||||
export declare function isPromise(payload: unknown): payload is Promise<unknown>;
|
||||
5
node_modules/is-what/dist/isPromise.js
generated
vendored
Normal file
5
node_modules/is-what/dist/isPromise.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { getType } from './getType.js';
|
||||
/** Returns whether the payload is a Promise */
|
||||
export function isPromise(payload) {
|
||||
return getType(payload) === 'Promise';
|
||||
}
|
||||
2
node_modules/is-what/dist/isRegExp.d.ts
generated
vendored
Normal file
2
node_modules/is-what/dist/isRegExp.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/** Returns whether the payload is a regular expression (RegExp) */
|
||||
export declare function isRegExp(payload: unknown): payload is RegExp;
|
||||
5
node_modules/is-what/dist/isRegExp.js
generated
vendored
Normal file
5
node_modules/is-what/dist/isRegExp.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { getType } from './getType.js';
|
||||
/** Returns whether the payload is a regular expression (RegExp) */
|
||||
export function isRegExp(payload) {
|
||||
return getType(payload) === 'RegExp';
|
||||
}
|
||||
2
node_modules/is-what/dist/isSet.d.ts
generated
vendored
Normal file
2
node_modules/is-what/dist/isSet.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/** Returns whether the payload is a Set */
|
||||
export declare function isSet(payload: unknown): payload is Set<unknown>;
|
||||
5
node_modules/is-what/dist/isSet.js
generated
vendored
Normal file
5
node_modules/is-what/dist/isSet.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { getType } from './getType.js';
|
||||
/** Returns whether the payload is a Set */
|
||||
export function isSet(payload) {
|
||||
return getType(payload) === 'Set';
|
||||
}
|
||||
2
node_modules/is-what/dist/isString.d.ts
generated
vendored
Normal file
2
node_modules/is-what/dist/isString.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/** Returns whether the payload is a string */
|
||||
export declare function isString(payload: unknown): payload is string;
|
||||
5
node_modules/is-what/dist/isString.js
generated
vendored
Normal file
5
node_modules/is-what/dist/isString.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { getType } from './getType.js';
|
||||
/** Returns whether the payload is a string */
|
||||
export function isString(payload) {
|
||||
return getType(payload) === 'String';
|
||||
}
|
||||
2
node_modules/is-what/dist/isSymbol.d.ts
generated
vendored
Normal file
2
node_modules/is-what/dist/isSymbol.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/** Returns whether the payload is a Symbol */
|
||||
export declare function isSymbol(payload: unknown): payload is symbol;
|
||||
5
node_modules/is-what/dist/isSymbol.js
generated
vendored
Normal file
5
node_modules/is-what/dist/isSymbol.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { getType } from './getType.js';
|
||||
/** Returns whether the payload is a Symbol */
|
||||
export function isSymbol(payload) {
|
||||
return getType(payload) === 'Symbol';
|
||||
}
|
||||
10
node_modules/is-what/dist/isType.d.ts
generated
vendored
Normal file
10
node_modules/is-what/dist/isType.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import type { AnyFunction } from './isFunction.js';
|
||||
export type AnyClass = new (...args: unknown[]) => unknown;
|
||||
/**
|
||||
* Does a generic check to check that the given payload is of a given type. In cases like Number, it
|
||||
* will return true for NaN as NaN is a Number (thanks javascript!); It will, however, differentiate
|
||||
* between object and null
|
||||
*
|
||||
* @throws {TypeError} Will throw type error if type is an invalid type
|
||||
*/
|
||||
export declare function isType<T extends AnyFunction | AnyClass>(payload: unknown, type: T): payload is T;
|
||||
20
node_modules/is-what/dist/isType.js
generated
vendored
Normal file
20
node_modules/is-what/dist/isType.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
import { getType } from './getType.js';
|
||||
import { isFunction } from './isFunction.js';
|
||||
/**
|
||||
* Does a generic check to check that the given payload is of a given type. In cases like Number, it
|
||||
* will return true for NaN as NaN is a Number (thanks javascript!); It will, however, differentiate
|
||||
* between object and null
|
||||
*
|
||||
* @throws {TypeError} Will throw type error if type is an invalid type
|
||||
*/
|
||||
export function isType(payload, type) {
|
||||
if (!isFunction(type)) {
|
||||
throw new TypeError('Type must be a function');
|
||||
}
|
||||
if (!Object.hasOwn(type, 'prototype')) {
|
||||
throw new TypeError('Type is not a class');
|
||||
}
|
||||
// Classes usually have names (as functions usually have names)
|
||||
const { name } = type;
|
||||
return getType(payload) === name || Boolean(payload && payload.constructor === type);
|
||||
}
|
||||
2
node_modules/is-what/dist/isUndefined.d.ts
generated
vendored
Normal file
2
node_modules/is-what/dist/isUndefined.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/** Returns whether the payload is undefined */
|
||||
export declare function isUndefined(payload: unknown): payload is undefined;
|
||||
5
node_modules/is-what/dist/isUndefined.js
generated
vendored
Normal file
5
node_modules/is-what/dist/isUndefined.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { getType } from './getType.js';
|
||||
/** Returns whether the payload is undefined */
|
||||
export function isUndefined(payload) {
|
||||
return getType(payload) === 'Undefined';
|
||||
}
|
||||
2
node_modules/is-what/dist/isWeakMap.d.ts
generated
vendored
Normal file
2
node_modules/is-what/dist/isWeakMap.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/** Returns whether the payload is a WeakMap */
|
||||
export declare function isWeakMap(payload: unknown): payload is WeakMap<WeakKey, unknown>;
|
||||
5
node_modules/is-what/dist/isWeakMap.js
generated
vendored
Normal file
5
node_modules/is-what/dist/isWeakMap.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { getType } from './getType.js';
|
||||
/** Returns whether the payload is a WeakMap */
|
||||
export function isWeakMap(payload) {
|
||||
return getType(payload) === 'WeakMap';
|
||||
}
|
||||
2
node_modules/is-what/dist/isWeakSet.d.ts
generated
vendored
Normal file
2
node_modules/is-what/dist/isWeakSet.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/** Returns whether the payload is a WeakSet */
|
||||
export declare function isWeakSet(payload: unknown): payload is WeakSet<WeakKey>;
|
||||
5
node_modules/is-what/dist/isWeakSet.js
generated
vendored
Normal file
5
node_modules/is-what/dist/isWeakSet.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { getType } from './getType.js';
|
||||
/** Returns whether the payload is a WeakSet */
|
||||
export function isWeakSet(payload) {
|
||||
return getType(payload) === 'WeakSet';
|
||||
}
|
||||
Reference in New Issue
Block a user