@utilify/types
Version:
A utility library for type checks and type manipulation in JavaScript and TypeScript, providing functions to determine types and verify values like null, undefined, boolean, number, and more.
50 lines (25 loc) • 1.49 kB
TypeScript
declare function isArray(value: any): boolean;
declare function isBigint(value: any): boolean;
declare function isBoolean(value: any): boolean;
declare function isFunction(value: any): boolean;
declare function isNull(value: any): boolean;
declare function isNumber(value: any): boolean;
declare function isObject(value: any): boolean;
declare function isPlainObject(value: any): boolean;
declare function isString(value: any): boolean;
declare function isSymbol(value: any): boolean;
declare function isUndefined(value: any): boolean;
declare function isFalsy(value: any): boolean;
declare function isPrimitive(value: any): boolean;
declare function getType(value: any): string;
declare function isEqualType(value1: any, value2: any): boolean;
declare function isJSON(value: string): boolean;
declare function isMap(value: any): boolean;
declare function isSet(value: any): boolean;
declare function isPromise(value: object): boolean;
declare function isTruthy(value: any): boolean;
declare function isAsync(callback: Function): boolean;
declare function isDate(value: Date): boolean;
declare function isRegExp(value: any): boolean;
declare function getInstanceType(value: object): string | undefined;
export { getInstanceType, getType, isArray, isAsync, isBigint, isBoolean, isDate, isEqualType, isFalsy, isFunction, isJSON, isMap, isNull, isNumber, isObject, isPlainObject, isPrimitive, isPromise, isRegExp, isSet, isString, isSymbol, isTruthy, isUndefined };