@monstermann/fn
Version:
A utility library for TypeScript.
24 lines (22 loc) • 394 B
JavaScript
import { dfdlT } from "@monstermann/dfdl";
//#region src/string/isEmpty.ts
/**
* `isEmpty(target)`
*
* Checks if `target` string is empty.
*
* ```ts
* isEmpty(""); // true
* isEmpty("hello"); // false
* ```
*
* ```ts
* pipe("", isEmpty()); // true
* pipe("hello", isEmpty()); // false
* ```
*/
const isEmpty = dfdlT((target) => {
return target === "";
}, 1);
//#endregion
export { isEmpty };