double-digit

0.0.0 • Public • Published

double-digit

0️⃣ Add leading zero to positive numbers under 10

const dd = require('double-digit');
 
dd(2) // '02'
dd(2.2) // '02.2'
dd(11) // '11'
dd('2') // '02'
dd('Something else') // 'Something else'
dd(Infinity) // Infinity

Transpiled version

Environments which exclude node_modules from the transpiling pipeline should include the "browser" entry instead of "main". This exposes an ES5 commonjs module.

Also available for explicit import:

const reduce = require('double-digit/dist');

Package Sidebar

Install

npm i double-digit

Weekly Downloads

0

Version

0.0.0

License

MIT

Unpacked Size

3.32 kB

Total Files

4

Last publish

Collaborators

  • omrilotan