glize/formatters

Methods

(static) formatBytes(bytes) → {string}

Formats given bytes to human friendly format.
Source:
See:
Parameters:
Name Type Description
bytes number The bytes to be formatted.
Returns:
Type:
string
The formatted bytes as string.
Example
formatBytes(1024); // 1.0 Kb