UNPKG
@paydirt/fmt
Version:
latest (0.3.1)
next (0.4.0-rc.0)
0.4.0-rc.0
0.3.1
0.3.0
0.2.2
0.2.1
0.2.1-rc.3
String formating using commonly used standards
github.com/carlcalderon/fmt
carlcalderon/fmt
@paydirt/fmt
/
lib
/
bundle
/
replacers
/
integer.js
6 lines
(5 loc)
•
212 B
JavaScript
View Raw
1
2
3
4
5
6
import
stringReplacer
from
'./string'
;
export
default
function
(
_, mods, value
) {
var
sign = (mods.
sign
&& value >=
0
) ?
'+'
:
''
;
return
stringReplacer
(
's'
, mods, sign +
Math
.
floor
(value).
toString
()); }