Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 3 months 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 (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T21:54:29.000Z (about 2 years ago)
- Last Synced: 2024-04-26T06:53:39.748Z (10 months ago)
- Topics: browser, ecmascript, left, nodejs, string, trimming
- Language: JavaScript
- Size: 2.55 MB
- Stars: 1
- Watchers: 2
- 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
```