export function isNull ( value ) { return value == null ; } export function isUndefined ( value ) { return typeof value === "undefined" || value === undefined ; } export function isDefined ( value ) { return typeof value !== "undefined" && value !== undefined ; } export function isNil ( value ) { return isNull ( value ) || isUndefined ( value ) ; } export function isNilOrEmpty ( value ) { return isNil ( value ) || value === "" ; } export function isString ( value ) { return Object . prototype . toString . call ( value ) === "[object String]" ; } export function isNumber ( value ) { return typeof value === "number" ; } export function isArray < T > ( value ) { return Array . isArray ( value ) ; } export function isEmptyArray ( value ) { return isArray ( value ) && value . length === 0 ; } export function isFunction ( value ) { return typeof value === "function" ; } export function isObject ( value ) { return typeof value === "object" && ! Array . isArray ( value ) && value != null ; } export function isPlainObject ( value ) { if ( Object . prototype . toString . call ( value ) !== "[object Object]" ) { return false ; } const prototype = Object . getPrototypeOf ( value ) ; return prototype === null || prototype === Object . prototype ; } export function isPromise ( value ) { return ! isNil ( value ) && ! isNil ( value . then ) ; }