README
@lgd-utils/number
A front-end number tool
Usage
import number from '@lgd-utils/number';
const { convertDataSize, convertLargeNumber } = number;
console.log(convertDataSize(1024, 'KB')); // ['1', 'MB', 1, 1024, 'KB']
console.log(convertLargeNumber(100000000)); // ['1.00', '亿', 1, 100000000, '']
Contribute
Documentation
Related
- @lgd-utils/array - A front-end array tool
- @lgd-utils/axios - A axios adapter and middleware tool
- @lgd-utils/cached-storage - 一个具有失效功能的缓存存储库
- @lgd-utils/collection - A front-end collection tool
- @lgd-utils/error - A front-end error tool
- @lgd-utils/html - A front-end html tool
- @lgd-utils/object - A front-end object tool
- @lgd-utils/regexp - A front-end regexp tool
- @lgd-utils/symbol - A front-end symbol tool
- @lgd-utils/utils - A front-end utils tool
- @lgd-utils/validate - A front-end verification tool
- More…