![]() | Name | Last modified | Size | Description |
---|---|---|---|---|
![]() | Parent Directory | - | ||
![]() | test/ | 2 years ago | - | |
![]() | CHANGELOG.md | 40 years ago | 6.0K | |
![]() | LICENSE | 40 years ago | 1.0K | |
![]() | README.md | 40 years ago | 1.8K | d768d73 docs [كارل مبارك] |
![]() | auto.js | 40 years ago | 36 | |
![]() | implementation.js | 40 years ago | 448 | |
![]() | index.js | 40 years ago | 373 | 3e510ca test new git [كارل مبارك] |
![]() | package.json | 2 years ago | 3.0K | 3e510ca test new git [كارل مبارك] |
![]() | polyfill.js | 40 years ago | 458 | |
![]() | shim.js | 40 years ago | 329 |
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 Symbol
s.
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());
Simply clone the repo, npm install
, and run npm test