browserRuntime

tcmts.cli.web.browserRuntime · #ueuklvor · term · runs anywhere

The browser runtime with the codec inlined, as a standalone module (for tests and inspection).

import { codecSource } from "#codebase/tcmts/cli/codec";
import { runtimeSource } from "#codebase/tcmts/cli/web";

export function browserRuntime(): string {
  return runtimeSource.replace(/^import \{ encode, decode \} from .*$/m, codecSource().replaceAll("export ", ""));
}

uses

used by