trim-left-x
This method removes whitespace from the left end of a string.
trim-left-x.trimLeft2016
⇒ string
This method removes whitespace from the left end of a string. (ES2016)
Kind: static property of trim-left-x
Returns: string
- The left trimmed string.
Throws:
TypeError
If string is null or undefined or not coercible.
Param | Type | Description |
---|
string | string | The string to trim the left end whitespace from. |
Example
import {trimLeft2016} from 'trim-left-x';
console.log(trimLeft2016(' \t\na \t\n') === 'a \t\n');
trim-left-x
⇒ string
This method removes whitespace from the left end of a string. (ES2018)
Kind: static property of trim-left-x
Returns: string
- The left trimmed string.
Throws:
TypeError
If string is null or undefined or not coercible.
Param | Type | Description |
---|
string | string | The string to trim the left end whitespace from. |
Example
import trimLeft from 'trim-left-x');
console.log(trimLeft(' \t\na \t\n') === 'a \t\n');