trim-left-x

This method removes whitespace from the left end of a string.

MIT 43 个版本
安装
npm install trim-left-x
yarn add trim-left-x
pnpm add trim-left-x
bun add trim-left-x
README

Travis status Dependency status devDependency status npm version jsDelivr hits bettercodehub score Coverage Status

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-xstring

This method removes whitespace from the left end of a string. (ES2019)

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 trimStart from 'trim-left-x';

console.log(trimStart(' \t\na \t\n') === 'a \t\n'); // true
版本列表
4.1.2 2019-08-28
4.1.1 2019-08-20
4.1.0 2019-08-14
4.0.28 2019-07-31
4.0.27 2019-07-27
4.0.26 2019-07-27
4.0.25 2019-07-26
4.0.24 2019-07-25
4.0.23 2019-07-24
4.0.22 2019-07-24
4.0.21 2019-07-23
4.0.20 2019-07-22
4.0.19 2019-07-21
4.0.18 2019-07-21
4.0.17 2019-07-19
4.0.14 2019-07-18
4.0.13 2019-07-17
4.0.12 2019-07-17
4.0.11 2019-07-17
4.0.10 2019-07-17
4.0.9 2019-07-16
4.0.8 2019-07-16
4.0.7 2019-07-16
4.0.6 2019-07-15
4.0.5 2019-07-14
4.0.4 2019-07-13
4.0.3 2019-07-13
4.0.2 2019-07-12
4.0.1 2019-07-10
4.0.0 2019-07-10
3.0.0 2017-10-16
2.0.1 2017-09-26
2.0.0 2017-09-26
1.3.7 2017-09-26
1.3.5 2017-09-01
1.3.4 2017-09-01
1.3.3 2017-08-10
1.3.2 2017-08-10
1.3.1 2017-08-10
1.3.0 2017-07-12
1.2.0 2017-03-29
1.1.0 2017-03-29
1.0.0 2017-03-16