import { compositeKey } from "https://deno.land/x/composite_key@1.0.0/mod.ts";
Return Ref consisting of a component. This allows using a Map
, Set
and WeakMap
to weakly and/or privately associate data with the lifetime of a group of values.
Examples
Example 1
Example 1
import { compositeKey } from "https://deno.land/x/composite_key@$VERSION/mod.ts";
import {
assertEquals,
assertNotEquals,
} from "https://deno.land/std/testing/asserts.ts";
declare const fn: (a: number, b: number) => number;
assertEquals(compositeKey(fn, 0, 1), compositeKey(fn, 0, 1));
assertNotEquals(compositeKey(fn, 0, 0), compositeKey(fn, 0, 1));