import { EmplaceableMap } from "https://deno.land/x/cache_mapset@1.0.0/deps.ts";
Map with Emplaceable implementation.
Examples
Example 1
Example 1
import { EmplaceableMap } from "https://deno.land/x/upsert@$VERSION/mod.ts";
import { assert } from "https://deno.land/std/testing/asserts.ts";
const map = new EmplaceableMap<string, number>();
declare const key: string;
map.emplace(key, {
insert: () => 0,
update: (existing) => existing + 1,
});
assert(map.has(key));