0.0.0 • Published 5 years ago

double-digit v0.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

double-digit npm.io npm.io

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');