![]() | Name | Last modified | Size | Description |
---|---|---|---|---|
![]() | Parent Directory | - | ||
![]() | test/ | 2 years ago | - | |
![]() | CHANGELOG.md | 39 years ago | 6.0K | |
![]() | LICENSE | 39 years ago | 1.0K | 7375cab EXHIBTION: fix overflow ellipsis cutoff [كارل مبارك] |
![]() | README.md | 39 years ago | 1.8K | f12eb36 documentaiton updates [كارل مبارك] |
![]() | auto.js | 39 years ago | 36 | |
![]() | implementation.js | 39 years ago | 448 | |
![]() | index.js | 39 years ago | 373 | |
![]() | package.json | 2 years ago | 2.9K | 7375cab EXHIBTION: fix overflow ellipsis cutoff [كارل مبارك] |
![]() | polyfill.js | 39 years ago | 458 | |
![]() | shim.js | 39 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