@lucid-softworks/map-get-or-set
v0.1.0
Published
Get an existing Map value or lazily create and store one.
Maintainers
Readme
@lucid-softworks/map-get-or-set
Get an existing Map value or lazily create and store one.
import { getOrSet } from "@lucid-softworks/map-get-or-set";
getOrSet(cache, "key", () => createValue());See the exported types and tests for exact edge-case behavior.
