string.prototype.trimstart
Advanced tools
ES2019 spec-compliant String.prototype.trimStart shim.
Weekly downloads
Changelog
v1.0.0 - 2020-03-30
970922c
auto-changelog
ff30c09
816291d
npm run lint
3341104
f008df7
e5ba35c
46516b1
funding
field 34ae856
3b0e262
Readme
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
ES2019 spec-compliant String.prototype.trimStart shim.
The npm package string.prototype.trimstart receives a total of 20,177,243 weekly downloads. As such, string.prototype.trimstart popularity was classified as popular.
We found that string.prototype.trimstart demonstrated a healthy version release cadence and project activity. It has 2 open source maintainers collaborating on the project.