import { compositeSymbol } from "https://deno.land/x/composite_key@1.0.0/mod.ts";
Return Symbol
consisting of a component. This allows strongly attaching data to an object that is associated with a group of values.
Examples
Example 1
Example 1
import { compositeSymbol } from "https://deno.land/x/composite_key@$VERSION/mod.ts";
import {
assertEquals,
assertNotEquals,
} from "https://deno.land/std/testing/asserts.ts";
declare const object: object;
assertEquals(compositeSymbol(0, 1), compositeSymbol(0, 1));
assertEquals(compositeSymbol(0, object), compositeSymbol(0, object));
assertNotEquals(compositeSymbol(0), compositeSymbol(1));
assertNotEquals(compositeSymbol(0, {}), compositeSymbol(0, {}));