string.prototype.padend

ES2017 spec-compliant String.prototype.padEnd shim.

MIT 8 个版本
安装
npm install string.prototype.padend
yarn add string.prototype.padend
pnpm add string.prototype.padend
bun add string.prototype.padend
README

String.prototype.padEnd Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

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

版本列表
3.1.6 2024-03-21
3.1.5 2023-09-05
3.1.4 2022-11-07
3.1.3 2021-10-05
3.1.2 2021-02-20
3.1.1 2020-11-21
3.1.0 2019-12-14
3.0.0 2015-11-17