Skip to main content
Module

x/bencodex/mod.ts>Value

An alternative take on implementing Bencodex in TypeScript/JavaScript
Latest
type alias Value
import { type Value } from "https://deno.land/x/bencodex@0.2.2/mod.ts";

Represents a value which can be encoded in Bencodex. Each data type in Bencodex has its corresponding type in JavaScript:

  • null represents Bencodex's null
  • boolean represents Bencodex's Boolean
  • bigint represents Bencodex's integer
  • string represents Bencodex's text
  • Uint8Array represents Bencodex's binary
  • Value[] represents Bencodex's list
  • Dictionary represents Bencodex's dictionary (note that it is not a concrete type, but an interface)
definition:
| null
| boolean
| bigint
| Key
| List