@monstermann/fn
Version:
A utility library for TypeScript.
22 lines (20 loc) • 343 B
JavaScript
import { dfdlT } from "@monstermann/dfdl";
//#region src/string/length.ts
/**
* `length(target)`
*
* Returns the length of `target` string.
*
* ```ts
* length("hello world"); // 11
* ```
*
* ```ts
* pipe("hello world", length()); // 11
* ```
*/
const length = dfdlT((target) => {
return target.length;
}, 1);
//#endregion
export { length };