Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Latest commit

 

History

History
24 lines (16 loc) · 380 Bytes

format_file_size.md

File metadata and controls

24 lines (16 loc) · 380 Bytes

numbers/formatFileSize

Format a file size into a human readable string

function formatFileSize(size: number): string

Args

size:number
The file size.

Returns

A string human readable.

Examples

import { formatFileSize } from '@deskpro/js-utils/dist/numbers';

console.log(formatFileSize(12657893)); // Outputs 12.7 MB