UNPKG

@monstermann/fn

Version:

A utility library for TypeScript.

22 lines (20 loc) 399 B
import { dfdlT } from "@monstermann/dfdl"; //#region src/string/trimEnd.ts /** * `trimEnd(target)` * * Removes whitespace from the end of `target` string. * * ```ts * trimEnd(" hello world "); // " hello world" * ``` * * ```ts * pipe(" hello world ", trimEnd()); // " hello world" * ``` */ const trimEnd = dfdlT((target) => { return target.trimEnd(); }, 1); //#endregion export { trimEnd };