UNPKG

@onesy/utils

Version:
11 lines (10 loc) 812 B
export declare type TIsValidType = 'date' | 'unix' | 'timestamp' | 'uuid' | 'binary-string' | 'hexadecimal-string' | 'url' | 'url-path' | 'domain-name' | 'compare' | 'semver' | 'semver-compare' | 'mobile' | 'email' | 'password' | 'hash' | 'color' | 'color-rgb' | 'color-hex' | 'color-hsl' | 'json' | 'min' | 'max' | 'min-max' | 'same-origin' | 'js-chunk' | 'http-method' | 'base64' | 'datauri' | 'pascal-case' | 'camel-case'; export interface IOptions { variant?: string; min?: number; max?: number; valueA?: any; valueB?: any; operator?: 'less-than' | 'less-than-equal' | 'equal' | 'not-equal' | 'array-all' | 'array-some' | 'starts-with' | 'contains' | 'greater-than-equal' | 'greater-than'; } export default function isValid(type: TIsValidType, value?: any, options_?: IOptions): any;