Skip to main content
Module

std/fmt/bytes.ts>prettyBytes

Deno standard library
Go to Latest
function prettyBytes
import { prettyBytes } from "https://deno.land/std@0.129.0/fmt/bytes.ts";

Convert bytes to a human readable string: 1337 → 1.34 kB

Parameters

num: number

The number to format

optional
options: PrettyBytesOptions = [UNSUPPORTED]

The options

Returns

string