makeHashMap = initialValues => {

  const map = Object.create(null);
  Object.defineProperty(map, 'hasOwnProperty', {
    enumerable: false,
    configurable: false,
    writable: false,
    value: Object.prototype.hasOwnProperty.bind(map)
  });

  if (initialValues) {
    for (let key in initialValues) {
      if (initialValues.hasOwnProperty(key)) {
        map[key] = initialValues[key];
      }
    }
  }

  return map;

}
Factory function to return a prototypeless object that is used as
map. It only has the property hasOwnProperty in order to to be
exchangeble with other framworks that depend on this method like
e.g. visjs.

@param {Object} [initialValues] - an object whose own properties will be
    used to initialize the map.