This is a
playground to test code. It runs a full
Node.js environment and already has all of
npm’s 400,000 packages pre-installed, including
string.prototype.padstart with all
npm packages installed. Try it out:
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.
An ES2017 spec-compliant
String.prototype.padStart shim. Invoke its "shim" method to shim
String.prototype.padStart if it is unavailable.
Most common usage:
var padStart = require('string.prototype.padstart'); assert(padStart('foo', 5, 'bar') === 'bafoo'); padStart.shim(); assert(padStart('foo', 2) === 'foo'.padStart(2));
Simply clone the repo,
npm install, and run