export type Constructor < T = Record < string , unknown > > = { new ( ... args ) : T ; prototype : T ; } ; /**
 * No-operation (noop).
 */ export const noop = ( ... _ ) : void => { } ; param value export const isNull = ( value ) : value is null => value === null ; param value export const isUndefined = ( value ) : value is undefined => typeof value === 'undefined' ; param value export const isNil = ( value ) : value is null | undefined => isNull ( value ) || isUndefined ( value ) ; param value export const getConstructor = < T = unknown > ( value ) : T | undefined => ! isNil ( value ) ? ( value as any ) . constructor : undefined ; param value export const isObject = ( value ) : boolean => getConstructor ( value ) === Object ; param value export const isNumber = ( value ) : value is number => getConstructor ( value ) === Number && ! Number . isNaN ( value ) ; param value export const isString = ( value ) : value is string => getConstructor ( value ) === String ; param value export const isBoolean = ( value ) : value is boolean => getConstructor ( value ) === Boolean ; param value export const isFunction = ( value ) : value is Function => getConstructor ( value ) === Function ; param value export const isArray = ( value ) : value is unknown [ ] => Array . isArray ( value ) ; param value param constructor export const isInstanceOf = ( value , constructor ) : boolean => Boolean ( value && constructor && value instanceof constructor ) ; param value param object export const isPrototypeOf = ( value , object ) : boolean => Boolean ( value && object && Object . isPrototypeOf . call ( object . prototype , value ) ) ;