Module

shortenNumberWithUnit

Get a shorten number with unit (e.g. 1K, 1M)
Parameters:
Name Type Description
num The number to parse. E.g. 300000
divisor The divisor for each depth. E.g. 1000
unitsMap The mapping of depth to unit. E.g. ['K', 'M', 'B']

View Source number/shortenNumberWithUnit.js, line 7

A tuple type of [, ] format. E.g. [300, 'K']