Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/bencodex/src/types.ts>isKey

An alternative take on implementing Bencodex in TypeScript/JavaScript
Latest
function isKey
import { isKey } from "https://deno.land/x/bencodex@0.2.2/src/types.ts";

Checks if the given value can be used as a key in a Bencodex dictionary.

Parameters

value: unknown

The value to check.

Returns

value is Key

true iff the given value can be used as a key in a Bencodex dictionary.