left-pad

WebJar for left-pad

License

License

GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

left-pad
Last Version

Last Version

1.3.0
Release Date

Release Date

Type

Type

jar
Description

Description

left-pad
WebJar for left-pad
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/stevemao/left-pad

Download left-pad

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/left-pad/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>left-pad</artifactId>
    <version>1.3.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/left-pad/
implementation 'org.webjars.npm:left-pad:1.3.0'
// https://jarcasting.com/artifacts/org.webjars.npm/left-pad/
implementation ("org.webjars.npm:left-pad:1.3.0")
'org.webjars.npm:left-pad:jar:1.3.0'
<dependency org="org.webjars.npm" name="left-pad" rev="1.3.0">
  <artifact name="left-pad" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='left-pad', version='1.3.0')
)
libraryDependencies += "org.webjars.npm" % "left-pad" % "1.3.0"
[org.webjars.npm/left-pad "1.3.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

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 plane are considered two distinct characters. See #58.

Versions

Version
1.3.0
1.2.0
1.1.3
0.0.4
0.0.3