esnext.map.update-or-insert.js 372 B

12345678910
  1. 'use strict';
  2. // TODO: remove from `core-js@4`
  3. var $ = require('../internals/export');
  4. var upsert = require('../internals/map-upsert');
  5. // `Map.prototype.updateOrInsert` method (replaced by `Map.prototype.emplace`)
  6. // https://github.com/thumbsupep/proposal-upsert
  7. $({ target: 'Map', proto: true, real: true, name: 'upsert', forced: true }, {
  8. updateOrInsert: upsert
  9. });