npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

string.prototype.padright

2.1.0

@ljharb

npmHomeRepoSnykSocket
Downloads:26
$ npm install string.prototype.padright
DailyWeeklyMonthlyYearly

String.prototype.padRight Version Badge

Build Status dependency status dev dependency status License Downloads

npm badge

browser support

An ES7 spec-compliant String.prototype.padRight shim. Invoke its "shim" method to shim String.prototype.padRight if it is unavailable.

This package implements the es-shim API interface. It works in an ES3-supported environment and complies with the spec proposal.

Most common usage:

var padRight = require('string.prototype.padright');

assert(padRight('foo', 5, 'bar') === 'fooba');

padRight.shim();

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

Tests

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