![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/mets.corals.io/wp-content/metras.v32.1/node_modules/map-obj/ |
# map-obj [](https://travis-ci.org/sindresorhus/map-obj) > Map object keys and values into a new object ## Install ``` $ npm install --save map-obj ``` ## Usage ```js var mapObj = require('map-obj'); var newObject = mapObj({foo: 'bar'}, function (key, value, object) { // first element is the new key and second is the new value // here we reverse the order return [value, key]; }); //=> {bar: 'foo'} ``` ## License MIT © [Sindre Sorhus](http://sindresorhus.com)