source: trip-planner-front/node_modules/webpack/lib/util/objectToMap.js@ 59329aa

Last change on this file since 59329aa was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 346 bytes
Line 
1/*
2 MIT License http://www.opensource.org/licenses/mit-license.php
3*/
4
5"use strict";
6
7/**
8 * Convert an object into an ES6 map
9 *
10 * @param {object} obj any object type that works with Object.entries()
11 * @returns {Map<string, any>} an ES6 Map of KV pairs
12 */
13module.exports = function objectToMap(obj) {
14 return new Map(Object.entries(obj));
15};
Note: See TracBrowser for help on using the repository browser.