add-zero-ts
v1.0.0
Published
Add a leading zero to a number
Downloads
3
Maintainers
Readme
add-zero-ts
Add a leading zero to a number.
Install
Via npm:
$ npm install add-zero-ts --save
Usage
import { addZero } from 'add-zero';
addZero(5); // 05
addZero(10); // 10
addZero(-5); // -05
addZero(-10); // -10
API
addZero(value)
value
Type: number
(integer) or string
Value in which a leading zero should be added to.
License
MIT © Ignacio Royo-Villanova