Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inBook a demo

left-pad

Package Overview
Dependencies
0
Maintainers
3
Versions
15
Issues
File Explorer

Advanced tools

left-pad

String left pad

    1.3.0latest

Version published
Maintainers
3
Weekly downloads
2,368,012
increased by5.28%

Weekly downloads

Readme

Source

left-pad

String left pad

Build Status

Install

$ npm install left-pad

Usage

const leftPad = require('left-pad') leftPad('foo', 5) // => " foo" leftPad('foobar', 6) // => "foobar" leftPad(1, 2, '0') // => "01" leftPad(17, 5, 0) // => "00017"

NOTE: The third argument should be a single char. However the module doesn't throw an error if you supply more than one chars. See #28.

NOTE: Characters having code points outside of BMP plan are considered a two distinct characters. See #58.

Keywords

FAQs

What is left-pad?

String left pad

Is left-pad popular?

The npm package left-pad receives a total of 2,000,495 weekly downloads. As such, left-pad popularity was classified as popular.

Is left-pad well maintained?

We found that left-pad demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.It has 3 open source maintainers collaborating on the project.

Last updated on 09 Apr 2018

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc