string.prototype.trimend
ES2019 spec-compliant String.prototype.trimEnd shim.
Last updated 8 months ago by ljharb .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install string.prototype.trimend 
SYNC missed versions from official npm registry.

String.prototype.trimEnd Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

An ES2019-spec-compliant String.prototype.trimEnd shim. Invoke its "shim" method to shim String.prototype.trimEnd if it is unavailable.

This package implements the es-shim API interface. It works in an ES3-supported environment and complies with the spec. In an ES6 environment, it will also work properly with Symbols.

Most common usage:

var trimEnd = require('string.prototype.trimend');

assert(trimEnd(' \t\na \t\n') === 'a \t\n');

if (!String.prototype.trimEnd) {
	trimEnd.shim();
}

assert(trimEnd(' \t\na \t\n ') === ' \t\na \t\n '.trimEnd());

Tests

Simply clone the repo, npm install, and run npm test

Current Tags

  • 1.0.8                                ...           latest (8 months ago)

11 Versions

  • 1.0.8                                ...           8 months ago
  • 1.0.7                                ...           a year ago
  • 1.0.6                                ...           2 years ago
  • 1.0.5                                ...           3 years ago
  • 1.0.4                                ...           4 years ago
  • 1.0.3                                ...           4 years ago
  • 1.0.2                                ...           4 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
  • 0.1.0                                ...           7 years ago
  • 0.0.1                                ...           7 years ago
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (12)

© 2010 - cnpmjs.org x YWFE | Home | YWFE