Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

map-emplace.js 397B

12345678910111213
  1. 'use strict';
  2. var anObject = require('../internals/an-object');
  3. // `Map.prototype.emplace` method
  4. // https://github.com/thumbsupep/proposal-upsert
  5. module.exports = function emplace(key, handler) {
  6. var map = anObject(this);
  7. var value = (map.has(key) && 'update' in handler)
  8. ? handler.update(map.get(key), key, map)
  9. : handler.insert(key, map);
  10. map.set(key, value);
  11. return value;
  12. };