get-double-digit
v0.0.3arrow_drop_downv0.0.3
v0.0.2
v0.0.1
STATUS
Passing
DOWNLOADS
0
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
7 years ago
SIZE
569 B
Returns a number as at least a two-digits number (with leading zero if required).
1 contributor
Like
Install get-double-digit as a package?
Copied
npm i @bit/tomlandau.simple-js.format-date.get-double-digit
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example modifieddraft
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
and packages in Bit or NPM to the example. any of the 1 million componentstoggle layout
No preview available
chevron_left
chevron_right
getDoubleDigit (
num:
) : number
string
Returns a number as at least a two-digits number (with leading zero if required).
Example
Argument
num:
number
Returns
string
Test Summary
getDoubleDigit should return same number for a double digit number | Pass |
getDoubleDigit should return same number for a triple digit number | Pass |
getDoubleDigit should return number with leading zero for a single digit number | Pass |
getDoubleDigit should return same number for a negative number | Pass |
getDoubleDigit should return number with leading zero for a single digit number, served as a string | Pass |
getDoubleDigit should not try to change argument if it`s not a number | Pass |