Skip to content

Commit e80e00e

Browse files
author
Shivam Singla
committed
attemp fix doc #broken
1 parent d0f6f48 commit e80e00e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

trim.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,17 @@ function _trim(str: string, t: string = '') {
1111
return t ? str.replace(regEx, '') : str.trim()
1212
}
1313

14+
const curried = curryN(2, _trim)
15+
1416
/** Trims the string `str` from both end with `t`.
1517
* Trims with white space if `t` is [''], with `t` otherwise.
1618
*
1719
* Fae.trim(' xyz ', ''); // 'xyz
1820
* Fae.trim('[[Hello]]]', '[') // Hello]]]
19-
* Fae.trim('[[Hello]]]', ']]') // [[Hello]]*/
20-
export const trim: Curry2<string, string, string> = curryN(2, _trim)
21+
* Fae.trim('[[Hello]]]', ']]') // [[Hello]]
22+
*/
23+
export function trim(str: string, t: string): string;
24+
export function trim() {
25+
return curried(arguments)
26+
}
2127

0 commit comments

Comments
 (0)