Add wrap manager for tracking gift wraps

This commit is contained in:
Jon Staab
2025-10-17 12:42:29 -07:00
parent ca38cbe20b
commit 247c7bafeb
27 changed files with 406 additions and 319 deletions
+12
View File
@@ -958,6 +958,18 @@ export const deepMergeRight = (a: Obj, b: Obj) => {
export const switcher = <T>(k: string, m: Record<string, T>) =>
m[k] === undefined ? m.default : m[k]
// ----------------------------------------------------------------------------
// Maps
// ----------------------------------------------------------------------------
export const mapPop = <K, T>(k: K, m: Map<K, T>) => {
const v = m.get(k)
m.delete(k)
return v
}
// ----------------------------------------------------------------------------
// Combinators
// ----------------------------------------------------------------------------