{"_id":"remap-keys","_rev":"4576761","name":"remap-keys","description":"Rename the keys of a JavaScript Object simply by using a map/dict to do it","dist-tags":{"latest":"1.0.4"},"maintainers":[{"name":"daviddias","email":"daviddias.p@gmail.com"}],"time":{"modified":"2026-04-10T15:45:15.000Z","created":"2015-09-04T03:31:16.091Z","1.0.4":"2016-08-19T13:54:56.025Z","1.0.3":"2016-08-19T13:46:15.530Z","1.0.2":"2015-09-14T10:36:44.238Z","1.0.1":"2015-09-04T16:28:57.177Z","1.0.0":"2015-09-04T03:31:16.091Z"},"users":{},"author":{"name":"David Dias","email":"daviddias@ipfs.io"},"repository":{"type":"git","url":"git+https://github.com/diasdavid/rename-keys.git"},"versions":{"1.0.4":{"name":"remap-keys","version":"1.0.4","description":"Rename the keys of a JavaScript Object simply by using a map/dict to do it","main":"src/index.js","scripts":{"test":"lab tests/*test.js","cov":"lab -c tests/*test.js -t 94","lint":"standard"},"pre-commit":["test","cov","lint"],"repository":{"type":"git","url":"git+https://github.com/diasdavid/rename-keys.git"},"keywords":["IPFS"],"engines":{"node":"^4.0.0"},"author":{"name":"David Dias","email":"daviddias@ipfs.io"},"license":"MIT","bugs":{"url":"https://github.com/diasdavid/rename-keys/issues"},"homepage":"https://github.com/diasdavid/rename-keys","devDependencies":{"code":"^3.0.2","lab":"^11.0.0","pre-commit":"^1.1.3","standard":"^7.1.2"},"dependencies":{"lodash.reduce":"^4.6.0"},"gitHead":"5c2719add0ffbd765e30a0bd53fb2ba04abe2516","_id":"remap-keys@1.0.4","_shasum":"71f3801bca394a2fe6c1f3d0b8601374d3eccce1","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"daviddias","email":"daviddias.p@gmail.com"},"maintainers":[{"name":"daviddias","email":"daviddias.p@gmail.com"}],"dist":{"shasum":"71f3801bca394a2fe6c1f3d0b8601374d3eccce1","size":2657,"noattachment":false,"key":"/remap-keys/-/remap-keys-1.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/remap-keys/download/remap-keys-1.0.4.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/remap-keys-1.0.4.tgz_1471614894327_0.863876182353124"},"directories":{},"_cnpmcore_publish_time":"2021-12-23T17:39:21.657Z","publish_time":1471614896025,"_cnpm_publish_time":1471614896025},"1.0.3":{"name":"remap-keys","version":"1.0.3","description":"Rename the keys of a JavaScript Object simply by using a map/dict to do it","main":"src/index.js","scripts":{"test":"lab tests/*test.js","cov":"lab -c tests/*test.js -t 94","lint":"standard"},"pre-commit":["test","cov","lint"],"repository":{"type":"git","url":"git+https://github.com/diasdavid/rename-keys.git"},"keywords":["IPFS"],"engines":{"node":"^4.0.0"},"author":{"name":"David Dias","email":"daviddias@ipfs.io"},"license":"MIT","bugs":{"url":"https://github.com/diasdavid/rename-keys/issues"},"homepage":"https://github.com/diasdavid/rename-keys","devDependencies":{"code":"^3.0.2","lab":"^11.0.0","pre-commit":"^1.1.3","standard":"^7.1.2"},"dependencies":{"lodash.reduce":"^4.6.0"},"gitHead":"6a7bb81185041ba8da06e24cdcea144d82ee4874","_id":"remap-keys@1.0.3","_shasum":"1a168323a0a00dbb31c62b94c887364596199f36","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"daviddias","email":"daviddias.p@gmail.com"},"maintainers":[{"name":"daviddias","email":"daviddias.p@gmail.com"}],"dist":{"shasum":"1a168323a0a00dbb31c62b94c887364596199f36","size":2677,"noattachment":false,"key":"/remap-keys/-/remap-keys-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/remap-keys/download/remap-keys-1.0.3.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/remap-keys-1.0.3.tgz_1471614374367_0.12267082114703953"},"directories":{},"_cnpmcore_publish_time":"2021-12-23T17:39:20.795Z","publish_time":1471614375530,"_cnpm_publish_time":1471614375530},"1.0.2":{"name":"remap-keys","version":"1.0.2","description":"Rename the keys of a JavaScript Object simply by using a map/dict to do it","main":"src/index.js","scripts":{"test":"lab tests/*test.js","cov":"lab -c tests/*test.js -t 94","lint":"standard"},"pre-commit":["test","cov","lint"],"repository":{"type":"git","url":"https://github.com/diasdavid/rename-keys.git"},"keywords":["IPFS"],"engines":{"node":"^4.0.0"},"author":{"name":"David Dias","email":"daviddias@ipfs.io"},"license":"MIT","bugs":{"url":"https://github.com/diasdavid/rename-keys/issues"},"homepage":"https://github.com/diasdavid/rename-keys","devDependencies":{"code":"^1.5.0","lab":"^5.16.0","pre-commit":"^1.1.1","standard":"^5.2.1"},"dependencies":{"underscore":"^1.8.3"},"gitHead":"c0945133da9342656db92feafb4cdd5c77823b68","_id":"remap-keys@1.0.2","_shasum":"b6dbddddd1f0f0dd739adaa2629b88cd197c3be5","_from":".","_npmVersion":"2.14.2","_nodeVersion":"4.0.0","_npmUser":{"name":"daviddias","email":"daviddias.p@gmail.com"},"maintainers":[{"name":"daviddias","email":"daviddias.p@gmail.com"}],"dist":{"shasum":"b6dbddddd1f0f0dd739adaa2629b88cd197c3be5","size":2672,"noattachment":false,"key":"/remap-keys/-/remap-keys-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/remap-keys/download/remap-keys-1.0.2.tgz"},"directories":{},"_cnpmcore_publish_time":"2021-12-23T17:39:19.925Z","publish_time":1442227004238,"_cnpm_publish_time":1442227004238},"1.0.1":{"name":"remap-keys","version":"1.0.1","description":"Rename the keys of a JavaScript Object simply by using a map/dict to do it","main":"src/index.js","scripts":{"test":"lab tests/*test.js","cov":"lab -c tests/*test.js -t 94","lint":"standard"},"pre-commit":["test","cov","lint"],"repository":{"type":"git","url":"https://github.com/diasdavid/rename-keys.git"},"keywords":["IPFS"],"author":{"name":"David Dias","email":"daviddias@ipfs.io"},"license":"MIT","bugs":{"url":"https://github.com/diasdavid/rename-keys/issues"},"homepage":"https://github.com/diasdavid/rename-keys","devDependencies":{"code":"^1.5.0","lab":"^5.16.0","pre-commit":"^1.1.1","standard":"^5.2.1"},"dependencies":{"underscore":"^1.8.3"},"gitHead":"f437fdd822b20a440b25382a5649438a05e4ed96","_id":"remap-keys@1.0.1","_shasum":"993046326a7724fd175402ef3c0bc7908a4b0f13","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"daviddias","email":"daviddias.p@gmail.com"},"maintainers":[{"name":"daviddias","email":"daviddias.p@gmail.com"}],"dist":{"shasum":"993046326a7724fd175402ef3c0bc7908a4b0f13","size":2684,"noattachment":false,"key":"/remap-keys/-/remap-keys-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/remap-keys/download/remap-keys-1.0.1.tgz"},"directories":{},"_cnpmcore_publish_time":"2021-12-23T17:39:19.056Z","publish_time":1441384137177,"_cnpm_publish_time":1441384137177},"1.0.0":{"name":"remap-keys","version":"1.0.0","description":"Rename the keys of a JavaScript Object simply by using a map/dict to do it","main":"src/index.js","scripts":{"test":"lab tests/*test.js","cov":"lab -c tests/*test.js -t 94","lint":"standard"},"pre-commit":["test","cov","lint"],"repository":{"type":"git","url":"https://github.com/diasdavid/rename-keys.git"},"keywords":["IPFS"],"author":{"name":"David Dias","email":"daviddias@ipfs.io"},"license":"MIT","bugs":{"url":"https://github.com/diasdavid/rename-keys/issues"},"homepage":"https://github.com/diasdavid/rename-keys","devDependencies":{"code":"^1.5.0","lab":"^5.16.0","pre-commit":"^1.1.1","standard":"^5.2.1"},"dependencies":{"underscore":"^1.8.3"},"gitHead":"bd76677719ab3c1b51a34f7ba363a189839f8470","_id":"remap-keys@1.0.0","_shasum":"7e98ed7a8c5a8a7dcb2ccb86f4ecbe12ee1a8a99","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"daviddias","email":"daviddias.p@gmail.com"},"maintainers":[{"name":"daviddias","email":"daviddias.p@gmail.com"}],"dist":{"shasum":"7e98ed7a8c5a8a7dcb2ccb86f4ecbe12ee1a8a99","size":2631,"noattachment":false,"key":"/remap-keys/-/remap-keys-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/remap-keys/download/remap-keys-1.0.0.tgz"},"directories":{},"_cnpmcore_publish_time":"2021-12-23T17:39:18.176Z","publish_time":1441337476091,"_cnpm_publish_time":1441337476091}},"readme":"remap-keys\n===========\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io)\n[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)\n[![Build Status](https://travis-ci.org/diasdavid/remap-keys.svg?style=flat-square)](https://travis-ci.org/diasdavid/remap-keys)\n[![Dependency Status](https://david-dm.org/diasdavid/remap-keys.svg?style=flat-square)](https://david-dm.org/diasdavid/remap-keys)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n\n> Rename the keys of a JavaScript Object simply by using a map/dict to do it\n\n# Usage\n\n```\nvar remapKeys = require('remap-keys')\n\nvar obj = {\n  data: 'aaah the data'\n}\n\nobj = remapKeys(obj, {\n  data: 'newKey'\n})\n\nconsole.log(obj)\n// { newKey: 'aaah the data'\n```\n\n# Credits\n\nWhile I was looking for a solution to remap keys in a JS obj, I found an [incomplete version](http://stackoverflow.com/a/31664783/520516) in Stack Overflow by [`tldr`](http://stackoverflow.com/users/1375688/tldr) which I used as inspiration for this module.\n","_attachments":{},"homepage":"https://github.com/diasdavid/rename-keys","bugs":{"url":"https://github.com/diasdavid/rename-keys/issues"},"license":"MIT"}