Sha256: 2367dfc72204d3cb78b3c131390d4ad5dbfb0d7e2612d5b7c9356dae95b48fbd
Contents?: true
Size: 476 Bytes
Versions: 21
Compression:
Stored size: 476 Bytes
Contents
export const isBlank = (object) => { return ( object === undefined || object === null || (typeof object === 'string' && object.length === 0) || (typeof object === 'object' && object.length === 0) ) } export const debounce = (fn, time) => { let timeoutId function wrapper(...args) { if (timeoutId) { clearTimeout(timeoutId) } timeoutId = setTimeout(() => { timeoutId = null fn(...args) }, time) } return wrapper }
Version data entries
21 entries across 21 versions & 1 rubygems