add-zero-ts
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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

Package Sidebar

Install

npm i add-zero-ts

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

2.25 kB

Total Files

4

Last publish

Collaborators

  • irvb