Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 1.35 KB

README.md

File metadata and controls

23 lines (17 loc) · 1.35 KB

Bytes Formatter Tweet

Build Status License NPM version Website NPM downloads

Bytes formatter module from Glize library.

Usage

npm install bytes-formatter --save
import { formatBytes } from 'bytes-formatter';

/**
 * Formats given <code>bytes</code> to human friendly format.
 * @param {number} bytes The bytes to be formatted.
 * @return {string} The formatted bytes as string.
 */
console.log(formatBytes(1024)); // 1.0 KB

For more information please visit Glize project page.