Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
simple function to pad a number with zeroes
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
README.md
index.js
package.json
test.js

README.md

zfill

Usage

var zfill = require('zfill');

console.log(zfill(9, 2)); // prints '09'
console.log(zfill(1234, 3)); // prints '1234'
Something went wrong with that request. Please try again.