map.getOrInsertComputed is newly baseline! It's a small feature, but I've found it pretty useful. Here's how it works.
Full docs and polyfills on MDN https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap/getOrInsertComputed


