Skip to content

Xotic750/trim-left-x

Repository files navigation

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