Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

ByteCount

import { ByteCount } from "https://raw.githubusercontent.com/i-xi-dev/bytes.es/4.1.0/mod.ts";
class ByteCount {
constructor(byteCount: int | bigint);
to(unit: ByteUnit): number;
valueOf(): number;
}

§Constructors

§
new ByteCount(byteCount: int | bigint)
[src]

§Methods

§
to(unit: ByteUnit): number
[src]
@param unit

The following units are supported. Units are case sensitive.

  • "byte"
  • "kilobyte"
  • "kibibyte"
  • "megabyte"
  • "mebibyte"
  • "gigabyte"
  • "gibibyte"
  • "terabyte"
  • "tebibyte"
  • "petabyte"
  • "pebibyte"
@return

The byte count expressed in specified unit.

§
valueOf(): number
[src]