@bitty/falsy
Version:
Falsy helper functions and types for TypeScript.
21 lines (17 loc) • 570 B
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
/**
* 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;
}
exports.default = isFalsy;
//# sourceMappingURL=main.js.map