source:
imaps-frontend/node_modules/@popperjs/core/lib/utils/expandToHashMap.js.flow
Last change on this file was 79a0317, checked in by , 6 months ago | |
---|---|
|
|
File size: 246 bytes |
Line | |
---|---|
1 | // @flow |
2 | |
3 | export default function expandToHashMap< |
4 | T: number | string | boolean, |
5 | K: string |
6 | >(value: T, keys: Array<K>): { [key: string]: T } { |
7 | return keys.reduce((hashMap, key) => { |
8 | hashMap[key] = value; |
9 | return hashMap; |
10 | }, {}); |
11 | } |
Note:
See TracBrowser
for help on using the repository browser.