trim-left-x

4.1.2 • Public • Published

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\n\t\n') === '\t\n'); // true

Package Sidebar

Install

npm i trim-left-x

Weekly Downloads

6,865

Version

4.1.2

License

MIT

Unpacked Size

146 kB

Total Files

11

Last publish

Collaborators

  • xotic750