Function trim

Removes leading and trailing whitespace from a string. Curried wrapper around String.prototype.trim for composition.

trim('  hello world  ');
// => 'hello world'
  • Parameters

    • str: string

      String to trim

    Returns string

    Trimmed string