function createContext
createContext(direction: "encode" | "decode"): Context

Creates a default context for encoding or decoding operations.

Parameters

direction: "encode" | "decode"

The direction of the operation ("encode" or "decode")

Return Type

A new Context with the specified direction and an empty refs WeakMap

Usage

import { createContext } from "mod.ts";