Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo-mod-jslibs-dist.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'popperjs/package/lib/utils/expandToHashMap.js')
-rw-r--r--popperjs/package/lib/utils/expandToHashMap.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/popperjs/package/lib/utils/expandToHashMap.js b/popperjs/package/lib/utils/expandToHashMap.js
new file mode 100644
index 0000000..e428d58
--- /dev/null
+++ b/popperjs/package/lib/utils/expandToHashMap.js
@@ -0,0 +1,6 @@
+export default function expandToHashMap(value, keys) {
+ return keys.reduce(function (hashMap, key) {
+ hashMap[key] = value;
+ return hashMap;
+ }, {});
+} \ No newline at end of file