📄 expandToHashMap.js.flow
/home/palash/git/site/node_modules/@popperjs/core/lib/utils/expandToHashMap.js.flow
Language: flow • Lines: 11
// @flow

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