@feugene/mu
Version:
Helpful TS utilities without dependencies
14 lines • 432 B
JavaScript
/**
* Checks whether the given string is blank (empty or whitespace-only).
* Non-strings always return false.
*/
export default function isBlank(value) {
return typeof value === 'string' && value.trim().length === 0;
}
/**
* Variadic version: returns true if all provided arguments are blank strings.
*/
export function isBlanks(...values) {
return !values.some(v => !isBlank(v));
}
//# sourceMappingURL=isBlank.mjs.map