Skip to content

trim

trim(target)

Removes whitespace from both ends of target string.

ts
trim("  hello world  "); // "hello world"
ts
pipe("  hello world  ", trim()); // "hello world"