{"_id":"keymirror","_rev":"42-aa6e65f9a924aa14bc30c30a371d1434","name":"keymirror","description":"A simple utility for creating an object with values equal to its keys. Identical to react/lib/keyMirror","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"keymirror","version":"0.1.0","description":"A simple utility for creating an object with values equal to its keys. Identical to react/lib/keyMirror","main":"index.js","author":{"name":"Samuel Reed","email":"sam@tixelated.com","url":"http://strml.net/"},"licenses":[{"type":"Apache-2.0","url":"http://www.apache.org/licenses/LICENSE-2.0"}],"_id":"keymirror@0.1.0","dist":{"shasum":"32f7d61188f9236fd22b79f74156a2c710ddafe7","tarball":"https://registry.npmjs.org/keymirror/-/keymirror-0.1.0.tgz","integrity":"sha512-7V4T2GyylWh/TX6px3Bgbgke1igbzJDg4KzurQkkS5KZj38O/Znw6VKgDRGLI9NbFZRsRHDtNmPY47g+4i0RPw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID3U8G7Kx3aE+8YEOLSmRc3Sxv5aTq7UxTuP7g//Ao3cAiAsisGKpopjOFUkaW/xGsNh8/Bozn0clyTmjKiIVyrXQg=="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"strml","email":"samuel.trace.reed@gmail.com"},"maintainers":[{"name":"strml","email":"samuel.trace.reed@gmail.com"}],"directories":{}},"0.1.1":{"name":"keymirror","version":"0.1.1","description":"A simple utility for creating an object with values equal to its keys. Identical to react/lib/keyMirror","main":"index.js","author":{"name":"Samuel Reed","email":"sam@tixelated.com","url":"http://strml.net/"},"repository":{"type":"git","url":"https://github.com/STRML/keyMirror"},"licenses":[{"type":"Apache-2.0","url":"http://www.apache.org/licenses/LICENSE-2.0"}],"gitHead":"2dafae96f33088e3030804f1113543c3c6c130b7","bugs":{"url":"https://github.com/STRML/keyMirror/issues"},"homepage":"https://github.com/STRML/keyMirror","_id":"keymirror@0.1.1","scripts":{},"_shasum":"918889ea13f8d0a42e7c557250eee713adc95c35","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"strml","email":"samuel.trace.reed@gmail.com"},"maintainers":[{"name":"strml","email":"samuel.trace.reed@gmail.com"}],"dist":{"shasum":"918889ea13f8d0a42e7c557250eee713adc95c35","tarball":"https://registry.npmjs.org/keymirror/-/keymirror-0.1.1.tgz","integrity":"sha512-vIkZAFWoDijgQT/Nvl2AHCMmnegN2ehgTPYuyy2hWQkQSntI0S7ESYqdLkoSe1HyEBFHHkCgSIvVdSEiWwKvCg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDeU8CfASkRbS3I7omMpoaLbvOPNRlUdbmuoE7hKpx+UAIgRxCNFZOA0FDL8StskrIDmhAYCyLBgiMiNW8iIrdMZIw="}]},"directories":{}}},"readme":"KeyMirror\n=========\n\nCreate an object with values equal to its key names.\n\nI thought `react/lib/keyMirror` was useful and wanted to reuse it without any dependencies.\n\nThis is not my code, this is property of Facebook.\n\nUsage\n-----\n\n`npm install keymirror`\n\n```javascript\nvar keyMirror = require('keyMirror');\nvar COLORS = keyMirror({blue: null, red: null});\nvar myColor = COLORS.blue;\nvar isColorValid = !!COLORS[myColor];\n```\n\nThe last line could not be performed if the values of the generated enum were\nnot equal to their keys.\n\nInput:  `{key1: val1, key2: val2}`\n\nOutput: `{key1: key1, key2: key2}`\n\nI sometimes use this with lodash - use the following upon your first use of lodash to mix it in:\n\n```javascript\nvar _ = require('lodash');\n_.mixin({keyMirror: require('keyMirror')});\n// Can now be used as _.keyMirror(object)\n```\n","maintainers":[{"name":"strml","email":"samuel.trace.reed@gmail.com"}],"time":{"modified":"2022-06-19T08:33:37.677Z","created":"2014-06-05T12:19:31.565Z","0.1.0":"2014-06-05T12:19:31.565Z","0.1.1":"2014-12-21T07:00:57.225Z"},"author":{"name":"Samuel Reed","email":"sam@tixelated.com","url":"http://strml.net/"},"readmeFilename":"README.md","homepage":"https://github.com/STRML/keyMirror","repository":{"type":"git","url":"https://github.com/STRML/keyMirror"},"bugs":{"url":"https://github.com/STRML/keyMirror/issues"},"users":{"306766053":true,"levisl176":true,"alexkval":true,"sheebz":true,"x4devs":true,"shipengyan":true,"monjer":true,"koko236":true,"koorgoo":true,"iolo":true,"yann86":true,"wfalkwallace":true,"nelix":true,"zhenghua":true,"xieranmaya":true,"vwal":true,"liugenbin":true,"elmorec":true,"lifecube":true,"koulmomo":true,"qqcome110":true,"meligatt":true,"zhiquan_yu":true,"canniee":true,"dillonace":true,"sunzhixun":true,"belcour":true}}