Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 339 Bytes

README.md

File metadata and controls

18 lines (13 loc) · 339 Bytes

birecord

Bi-directional record in type-safe way

How to use

npm install birecord
import birecord from "birecord";
// import birecord_for_deno from "https://deno.land/x/birecord/mod.ts";

const x = birecord({ foo: 123, bar: 456, baz: 789 });
const test1 = x.get("foo"); // 123
const test2 = x.get(123); // "foo"