【文件属性】:
文件名称:js-abbreviation-number:javascript中的缩写数字
文件大小:125KB
文件格式:ZIP
更新时间:2021-05-02 13:37:24
TypeScript
js-缩写编号
javascript中的缩写数字
安装
npm install js-abbreviation-number
用法
import { abbreviateNumber } from "js-abbreviation-number" ;
const num = abbreviateNumber ( 1000 , 1 ) ; // expected 1.0K
const num = abbreviateNumber ( 12 , 0 ) ; // expected 12
const num = abbreviateNumber ( 1100 , 2 ) ; // expected 1.10K
const num = abbreviateNumber ( 1100 , 2 , { padding : false } ) ; // expected 1.1K
const num =
【文件预览】:
js-abbreviation-number-master
----.gitignore(973B)
----jest.config.json(220B)
----images()
--------cover.png(38KB)
----package.json(1KB)
----package-lock.json(309KB)
----SECURITY.md(619B)
----LICENSE(1KB)
----tsconfig.json(6KB)
----_config.yml(27B)
----.github()
--------ISSUE_TEMPLATE()
--------PULL_REQUEST_TEMPLATE()
--------workflows()
----.prettierignore(66B)
----.eslintrc.js(407B)
----README.md(3KB)
----.eslintignore(63B)
----index.ts(1KB)
----.npmignore(22B)
----test()
--------index.test.ts(2KB)
----.prettierrc(76B)