Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

leadingzero

Travis (.com)

Add leading zeros to a number or string

Install

$ yarn add leadingzero
$ npm install leadingzero

Usage (ES6 imports)

import leadingzero from 'leadingzero';

// leadingzero(number, zeros, character)

leadingzero(7, 3);
// => '007'

leadingzero('10', 4);
// => '0010'

leadingzero(1234, 2);
// => '1234'

License

MIT © Benjamin Hollway

About

Add leading zeros to a number or string

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published