【文件属性】:
文件名称:format-thousands:使用自定义分隔符格式化千位
文件大小:83KB
文件格式:ZIP
更新时间:2021-05-31 09:19:39
utility vovanr-service JavaScript
千格式
使用自定义分隔符格式化千位:1 000 000
演示:
安装
npm install --save format-thousands
用法
var formatThousands = require ( 'format-thousands' ) ;
formatThousands ( 1000 ) ;
//=> '1 000'
formatThousands ( 5000 , { formatFourDigits : false } ) ;
//=> '5000'
formatThousands ( 1000000 , '`' ) ;
//=> '1`000`000'
formatThousands ( 10000 , { separator : "'" } ) ;
//=> "10'000"
formatThousands ( - 100000 ) ;
//=> "-10
【文件预览】:
format-thousands-master
----.mversionrc(210B)
----.gitattributes(85B)
----.github()
--------workflows()
----test.js(2KB)
----example()
--------index.html(3KB)
--------style.css(2KB)
----LICENSE(1KB)
----README.md(2KB)
----.editorconfig(215B)
----.gitignore(48B)
----index.js(2KB)
----CHANGELOG.md(1KB)
----package-lock.json(375KB)
----package.json(1KB)