Get a value from a Map or the defaultValue if the key is absent
defaultValue
const map = new Map();const value = getOrDefault(map)(1, 2);console.log(value); // 2
the Map key type
the Map value type
the Map to set the entry
Generated using TypeDoc
Example
Get a value from a Map or the
defaultValueif the key is absent