UNPKG

@synotech/utils

Version:

a collection of utilities for internal use

23 lines (22 loc) 469 B
/** * * This method is a truthy check for a given value * @module isTrue * @param {any} value - a stringified object in string format * @return {boolean} {Boolean} a boolean value * @example * * isTrue('') // returns false * */ export const isTrue = (value: any): boolean => { return !( value === '[object Object]' || value === 'undefined' || value === undefined || value === null || value === 'null' || value === 'NaN' || value === '' ); };