|
|
4 years ago | |
|---|---|---|
| .. | ||
| .github | 4 years ago | |
| node_modules | 4 years ago | |
| test | 4 years ago | |
| .editorconfig | 4 years ago | |
| .eslintignore | 4 years ago | |
| .eslintrc | 4 years ago | |
| .nycrc | 4 years ago | |
| CHANGELOG.md | 4 years ago | |
| LICENSE | 4 years ago | |
| README.md | 4 years ago | |
| auto.js | 4 years ago | |
| implementation.js | 4 years ago | |
| index.js | 4 years ago | |
| package.json | 4 years ago | |
| polyfill.js | 4 years ago | |
| shim.js | 4 years ago | |
An ES2017 spec-compliant String.prototype.padEnd shim. Invoke its "shim" method to shim String.prototype.padEnd 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 padEnd = require('string.prototype.padend');
assert(padEnd('foo', 5, 'bar') === 'fooba');
padEnd.shim();
assert(padEnd('foo', 2) === 'foo'.padEnd(2));
Simply clone the repo, npm install, and run npm test