@thai/get-or-create@0.0.5Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
latest
dtinth/thaiConvenience function to get or create a value in a map
This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers




JSR Score
100%
Published
a year ago (0.0.5)
f
getOrCreate
Gets the value associated with the specified key from the map. If the key does not exist, creates a new value using the provided createValue function, associates it with the key in the map, and returns the new value.