1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-11-10 08:10:18 +00:00
musix-oss/node_modules/string.prototype.trimright
2020-03-03 22:30:50 +02:00
..
.github/workflows Modules 2020-03-03 22:30:50 +02:00
test Modules 2020-03-03 22:30:50 +02:00
.eslintrc Modules 2020-03-03 22:30:50 +02:00
.travis.yml Modules 2020-03-03 22:30:50 +02:00
auto.js Modules 2020-03-03 22:30:50 +02:00
CHANGELOG.md Modules 2020-03-03 22:30:50 +02:00
implementation.js Modules 2020-03-03 22:30:50 +02:00
index.js Modules 2020-03-03 22:30:50 +02:00
LICENSE Modules 2020-03-03 22:30:50 +02:00
package.json Modules 2020-03-03 22:30:50 +02:00
polyfill.js Modules 2020-03-03 22:30:50 +02:00
README.md Modules 2020-03-03 22:30:50 +02:00
shim.js Modules 2020-03-03 22:30:50 +02:00

String.prototype.trimRight Version Badge

Build Status dependency status dev dependency status License Downloads

npm badge

browser support

A spec-proposal-compliant String.prototype.trimRight shim. Invoke its "shim" method to shim String.prototype.trimRight 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 trimRight = require('string.prototype.trimright');

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

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

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

Tests

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