@monstermann/fn
Version:
A utility library for TypeScript.
20 lines • 395 B
TypeScript
//#region src/string/take.d.ts
/**
* `take(target, amount)`
*
* Takes the first `amount` characters from `target` string.
*
* ```ts
* take("hello world", 5); // "hello"
* ```
*
* ```ts
* pipe("hello world", take(5)); // "hello"
* ```
*/
declare const take: {
(amount: number): (target: string) => string;
(target: string, amount: number): string;
};
//#endregion
export { take };