https://github.com/xotic750/trim-left-x
This method removes whitespace from the left end of a string
https://github.com/xotic750/trim-left-x
browser ecmascript left nodejs string trimming
Last synced: about 1 year ago
JSON representation
This method removes whitespace from the left end of a string
- Host: GitHub
- URL: https://github.com/xotic750/trim-left-x
- Owner: Xotic750
- License: mit
- Created: 2017-03-16T13:54:41.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T21:54:29.000Z (over 3 years ago)
- Last Synced: 2025-04-30T20:31:52.192Z (about 1 year ago)
- Topics: browser, ecmascript, left, nodejs, string, trimming
- Language: JavaScript
- Size: 2.55 MB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## trim-left-x (a.k.a trimStart in ES2019)
This method removes whitespace from the start of a string.
### `module.exports(string)` ⇒ number ⏏
### `trim-left-x` ⇒ string
This method removes whitespace from the left end of a string. (ES2019)
**Kind**: static property of [trim-left-x](#module_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**
```js
import trimStart from 'trim-left-x';
console.log(trimStart(' \t\na \t\n') === 'a \t\n'); // true
```