@monstermann/fn
Version:
A utility library for TypeScript.
22 lines • 577 B
TypeScript
//#region src/string/append.d.ts
/**
* `append(target, source)`
*
* Appends `source` or strings from `source` iterable to the end of `target` string.
*
* ```ts
* append("hello", " world"); // "hello world"
* append("hello", [" ", "world"]); // "hello world"
* ```
*
* ```ts
* pipe("hello", append(" world")); // "hello world"
* pipe("hello", append([" ", "world"])); // "hello world"
* ```
*/
declare const append: {
(source: Iterable<string>): (target: string) => string;
(target: string, source: Iterable<string>): string;
};
//#endregion
export { append };