UNPKG

@monstermann/fn

Version:

A utility library for TypeScript.

22 lines 592 B
//#region src/string/prepend.d.ts /** * `prepend(target, source)` * * Prepends `string` or strings from `source` iterable to the beginning of `target` string. * * ```ts * prepend("world", "hello "); // "hello world" * prepend("world", ["hello", " "]); // "hello world" * ``` * * ```ts * pipe("world", prepend("hello ")); // "hello world" * pipe("world", prepend(["hello", " "])); // "hello world" * ``` */ declare const prepend: { (source: Iterable<string>): (target: string) => string; (target: string, source: Iterable<string>): string; }; //#endregion export { prepend };