UNPKG

is-funcs

Version:

A very limited subset of is-* functions I use every day

12 lines (10 loc) 283 B
const REGEXP = /[\u180E\u200B]/gi /** * Check if `data` is an String and his trimmed length is > 0 * @param {string} data * @return {boolean} */ module.exports = function(data) { if (typeof data !== 'string') return false return data.replace(REGEXP, '').trim().length > 0 }