trim-right-x

4.1.2 • Public • Published

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

trim-right-x (a.k.a trimEnd in ES2019)

This method removes whitespace from the end of a string.

module.exports(string)number

trim-right-xstring

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

Kind: static property of trim-right-x
Returns: string - The right trimmed string.
Throws:

  • TypeError If string is null or undefined or not coercible.
Param Type Description
string string The string to trim the right end whitespace from.

Example

import trimEnd from 'trim-right-x';
 
console.log(trimEnd(' \t\n\t\n') === ' \t\na'); // true

Package Sidebar

Install

npm i trim-right-x

Weekly Downloads

6,334

Version

4.1.2

License

MIT

Unpacked Size

146 kB

Total Files

11

Last publish

Collaborators

  • xotic750