@stacksjs/validation
Version:
The Stacks Validation ways.
28 lines • 1.58 kB
TypeScript
export declare function isDef<T = any>(val?: T): val is T;
export declare function isBoolean(val: any): val is boolean;
export declare function isFunction<T extends Function>(val: any): val is T;
export declare function isNumber(val: any): val is number;
export declare function isString(val: unknown): val is string;
export declare function isObject(val: any): val is object;
export declare function isWindow(val: any): boolean;
export declare const isBrowser: boolean;
export declare const isServer: boolean;
export declare function isMap(val: any): val is Map<any, any>;
export declare function isSet(val: any): val is Set<any>;
export declare function isPromise<T = any>(val: any): val is Promise<T>;
export declare function isUndefined(v: any): boolean;
export declare function isNull(v: any): boolean;
export declare function isSymbol(v: any): boolean;
export declare function isDate(v: any): boolean;
export declare function isRegExp(v: any): boolean;
export declare function isArray(v: any): boolean;
export declare function isPrimitive(v: any): boolean;
export declare function isInteger(v: any): boolean;
export declare function isFloat(v: any): boolean;
export declare function isPositive(v: any): boolean;
export declare function isNegative(v: any): boolean;
export declare function isEven(v: any): boolean;
export declare function isOdd(v: any): boolean;
export declare function isEvenOrOdd(v: any): 'even' | 'odd';
export declare function isPositiveOrNegative(v: any): 'positive' | 'negative';
export declare function isIntegerOrFloat(v: any): 'integer' | 'float';