|
|
hace 1 mes | |
|---|---|---|
| .. | ||
| test | hace 1 mes | |
| .editorconfig | hace 1 mes | |
| .eslintrc | hace 1 mes | |
| .nycrc | hace 1 mes | |
| CHANGELOG.md | hace 1 mes | |
| LICENSE | hace 1 mes | |
| README.md | hace 1 mes | |
| auto.js | hace 1 mes | |
| implementation.js | hace 1 mes | |
| index.js | hace 1 mes | |
| package.json | hace 1 mes | |
| polyfill.js | hace 1 mes | |
| shim.js | hace 1 mes | |
An ES2017 spec-compliant String.prototype.padStart shim. Invoke its "shim" method to shim String.prototype.padStart if it is unavailable.
This package implements the es-shim API interface. It works in an ES3-supported environment and complies with the spec.
Most common usage:
var padStart = require('string.prototype.padstart');
assert(padStart('foo', 5, 'bar') === 'bafoo');
padStart.shim();
assert(padStart('foo', 2) === 'foo'.padStart(2));
Simply clone the repo, npm install, and run npm test