Socket
Socket
Sign inDemoInstall

pad-start

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    pad-start

ES spec-compliant String.prototype.padStart shim.


Version published
Weekly downloads
4.4K
decreased by-12.38%
Maintainers
1
Install size
5.44 kB
Created
Weekly downloads
 

Readme

Source

pad-start Version Badge

ES spec-compliant String.prototype.padStart shim.

MIT License

build:? coverage:?

Install

$ npm install --save pad-start 

Usage

For more use-cases see the tests


// a polyfill that doesn't overwrite the native method

var padStart = require('pad-start');

padStart('x', 4, 'ab');        // => 'abax'
padStart('x', 4);              // => '   x'
padStart('abcd', 2, '#');      // => 'abcd'
padStart('abcd', 6, '123456'); // => '12abcd'

  • pad-end - ES spec-compliant String.prototype.padEnd shim.
  • start-with - Determines whether a string begins with the characters of another string.
  • end-with - Determines whether a string ends with the characters of another string.

Contributing

Pull requests and stars are highly welcome.

For bugs and feature requests, please create an issue.

Keywords

FAQs

Last updated on 15 Apr 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc