![]() | Name | Last modified | Size | Description |
---|---|---|---|---|
![]() | Parent Directory | - | ||
![]() | test/ | 2 years ago | - | |
![]() | CHANGELOG.md | 39 years ago | 6.1K | |
![]() | LICENSE | 39 years ago | 1.0K | |
![]() | README.md | 39 years ago | 1.9K | d768d73 docs [كارل مبارك] |
![]() | auto.js | 39 years ago | 36 | |
![]() | implementation.js | 39 years ago | 454 | |
![]() | index.js | 39 years ago | 373 | 3e510ca test new git [كارل مبارك] |
![]() | package.json | 2 years ago | 3.0K | 3e510ca test new git [كارل مبارك] |
![]() | polyfill.js | 39 years ago | 463 | |
![]() | shim.js | 39 years ago | 337 |
An ES2019-spec-compliant String.prototype.trimStart
shim. Invoke its "shim" method to shim String.prototype.trimStart
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 trimStart = require('string.prototype.trimstart');
assert(trimStart(' \t\na \t\n') === 'a \t\n');
if (!String.prototype.trimStart) {
trimStart.shim();
}
assert(trimStart(' \t\na \t\n') === ' \t\na \t\n'.trimStart());
Simply clone the repo, npm install
, and run npm test