All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.lib.utils.expandToHashMap.js.flow Maven / Gradle / Ivy

There is a newer version: 2.11.8
Show newest version
// @flow

export default function expandToHashMap<
  T: number | string | boolean,
  K: string
>(value: T, keys: Array): { [key: string]: T } {
  return keys.reduce((hashMap, key) => {
    hashMap[key] = value;
    return hashMap;
  }, {});
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy