Home > sculp-js > numberAbbr
numberAbbr() function
将数字转换为携带单位的字符串
Signature:
typescript
numberAbbr: (num: number | string, units: Array<string>, options?: INumberAbbr) => stringParameters
Parameter | Type | Description |
|---|---|---|
num | number | string | |
units |
| |
options | INumberAbbr | (Optional) default: { ratio: 1000, decimals: 0, separator: ' ' } |
Returns:
string
{string}