UNPKG

@bitty/falsy

Version:

Falsy helper functions and types for TypeScript.

17 lines (15 loc) 499 B
/** * Union of values that is considered false when converted to `Boolean`. * @see {@link https://developer.mozilla.org/en-US/docs/Glossary/Falsy}. * @typedef {false | void | '' | 0 | 0n | null | undefined} Falsy */ /** * Check if value is falsy (`""`, `null`, `false`, `0`, `NaN` or `undefined`). * @param {*} value - The value that will be checked. * @returns {Boolean} */ function isFalsy(value) { return !value; } export { isFalsy as default }; //# sourceMappingURL=main.esm.js.map