Skip to content
ES spec-compliant shim for String.prototype.padEnd
JavaScript
Branch: master
Clone or download
ljharb [Tests] up to `node` `v12.7`, `v11.15`, `v10.16`, `v9.11`, `v8.16`, `…
…v6.17`, `4.9`; use `nvm install-latest-npm`
Latest commit c9c48ae Jul 24, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test
.eslintrc [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` Oct 17, 2015
.gitignore Only apps should have lockfiles. Jul 18, 2017
.npmrc
.travis.yml [Tests] up to `node` `v12.7`, `v11.15`, `v10.16`, `v9.11`, `v8.16`, `… Jul 24, 2019
CHANGELOG.md v3.0.0 Nov 17, 2015
LICENSE
README.md Stage 4 May 25, 2016
auto.js [New] add `auto` entry point Jul 24, 2019
implementation.js
index.js
package.json [Deps] update `define-properties`, `es-abstract`, `function-bind` Jul 24, 2019
polyfill.js Renaming to `padEnd`. Nov 17, 2015
shim.js [Dev Deps] update `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` May 31, 2016

README.md

String.prototype.padEnd Version Badge

Build Status dependency status dev dependency status License Downloads

npm badge

browser support

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));

Tests

Simply clone the repo, npm install, and run npm test

You can’t perform that action at this time.