/** * @hidden */ export const isPresent = (value: any): boolean => value !== null && value !== undefined; /** * @hidden */ export const isBlank: Function = (value: any): boolean => value === null || value === undefined; /** * @hidden */ export const isArray: Function = (value: any): boolean => Array.isArray(value); /** * @hidden */ export const isFunction: Function = (value: any): boolean => typeof value === 'function'; /** * @hidden */ export const isString: Function = (value: any): boolean => typeof value === 'string'; /** * @hidden */ export const isTruthy: Function = (value: any): boolean => !!value; /** * @hidden */ export const isNullOrEmptyString = (value: string): boolean => isBlank(value) || value.trim().length === 0; /** * @hidden */ export const isNotNullOrEmptyString = (value: string): boolean => !isNullOrEmptyString(value); /** * @hidden */ export const isNumeric: Function = (value: any): boolean => !isNaN(value - parseFloat(value)); /** * @hidden */ export const isDate: Function = (value: any): boolean => value && value.getTime; /** * @hidden */ export type Pair = [T, U];