UNPKG

antd

Version:

An enterprise-class UI design language and React components implementation

11 lines 500 B
// \b([A-Za-z_$][\w$]*)\s*!==\s*(?:undefined\s*&&\s*\1\s*!==\s*null|null\s*&&\s*\1\s*!==\s*undefined)\b // \b([A-Za-z_$][\w$\.]*)\s*===\s*(?:undefined|null)\s*\|\|\s*\1\s*===\s*(?:undefined|null)\b export const isNonNullable = val => { return val !== undefined && val !== null; }; export const isNumber = val => { return typeof val === 'number' && !Number.isNaN(val); }; export const isPrimitive = value => { return typeof value !== 'object' && typeof value !== 'function' || value === null; };