Package Exports
- trim-x
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (trim-x) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
trim-x
This method removes whitespace from the start and end of a string.
module.exports(string)
⇒ number
⏏
trim-x
⇒ string
This method removes whitespace from the start and end of a string. (ES2019)
Kind: static property of trim-x
Returns: string
- The trimmed string.
Throws:
TypeError
If string is null or undefined or not coercible.
Param | Type | Description |
---|---|---|
string | string |
The string to trim the whitespace from. |
Example
import trim from 'trim-x';
console.log(trim(' \t\na \t\n') === 'a'); // true