File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ export const isFunction = <T extends Function> (val: any): val is T => typeof va
66export const isNumber = ( val : any ) : val is number => typeof val === 'number'
77export const isString = ( val : unknown ) : val is string => typeof val === 'string'
88export const isObject = ( val : any ) : val is object => toString ( val ) === '[object Object]'
9+ export const isUndefined = ( val : any ) : val is undefined => toString ( val ) === '[object Undefined]'
10+ export const isNull = ( val : any ) : val is null => toString ( val ) === '[object Null]'
11+ export const isRegExp = ( val : any ) : val is RegExp => toString ( val ) === '[object RegExp]'
12+ export const isDate = ( val : any ) : val is Date => toString ( val ) === '[object Date]'
913
1014// @ts -ignore
1115export const isWindow = ( val : any ) : boolean => typeof window !== 'undefined' && toString ( val ) === '[object Window]'
You can’t perform that action at this time.
0 commit comments