code: function toMap(hash) {
    let m = new Map;
    for (let key in hash) {
      if (hash.hasOwnProperty(key)) {
        m.set(key, hash[key]);
      }
    }
    return m;
  }
docs: Converts a generic hash object to a map.
  @param {!Object<string, ?>} hash The hash object.
  @return {!Map<string, ?>} The converted map.