UNPKG

@monstermann/fn

Version:

A utility library for TypeScript.

22 lines (20 loc) 472 B
import { dfdlT } from "@monstermann/dfdl"; //#region src/string/padEnd.ts /** * `padEnd(target, length, fill)` * * Pads `target` string from the end with `fill` string until the result reaches the specified `length`. * * ```ts * padEnd("hello", 10, " "); // "hello " * ``` * * ```ts * pipe("hello", padEnd(10, " ")); // "hello " * ``` */ const padEnd = dfdlT((target, length, fill) => { return target.padEnd(length, fill); }, 3); //#endregion export { padEnd };