Skip to content
ES spec-compliant shim for String.prototype.padEnd
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
Type Name Latest commit message Commit time
Failed to load latest commit information.
.eslintrc [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` Oct 17, 2015
.gitignore Only apps should have lockfiles. Jul 18, 2017
.travis.yml [Tests] up to `node` `v12.7`, `v11.15`, `v10.16`, `v9.11`, `v8.16`, `… Jul 24, 2019 v3.0.0 Nov 17, 2015
LICENSE Stage 4 May 25, 2016
auto.js [New] add `auto` entry point Jul 24, 2019
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

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


assert(padEnd('foo', 2) === 'foo'.padEnd(2));


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

You can’t perform that action at this time.