数字格式化
numable
A javascript library for formatting numbers.
Website and documentation
Browser Compatibilitynumable.js supports all browsers that are ES5-compliant (IE8 and below are not supported).
DocumentationTo check out live examples and docs, visit numableJS.
FormatSee the documentation for detailed formatting Settings
const nnn = numable(123456.123456); console.log(nnn.format("#,###")); // console => 123,456 // format // #,### => 123,456 // ¥#,#### => ¥12,3456 // $#,##0.000 => $123,456.000 // 00000#,###.000000 => 00000123,456.000000 // #.#% => 12.3% // #.00% => 12.30% // ... Acknowlegements
numable.js, while less complex, was inspired by and heavily borrowed from Numeral.js
版权声明:
1、该文章(资料)来源于互联网公开信息,我方只是对该内容做点评,所分享的下载地址为原作者公开地址。2、网站不提供资料下载,如需下载请到原作者页面进行下载。