upsert() for (Weak)Map (https://github.com/thumbsupep/proposal-upsert)
npm install map-upsertupsert() for (Weak)Map, as defined in the tc 39 proposal.
This module follows the same logic as outlined in the proposed api, but the first argument is the Map or WeakMap object.
``typescript
import upsert from 'map-upsert'
const map = new Map
const updateFn = (old: number): number => old + 1;
const insertFn = () => 0;
const upsert = require('map-upsert');
upsert(map, 'key', updateFn, insertFn);
assert.equals(map.get('key', 0);
upsert(map, 'key', updateFn, insertFn);
assert.equal(map.get('key', 1);
``