{"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":"http://registry-npm.ywwl.com/keymirror/download/keymirror-0.1.0.tgz","integrity":"sha512-7V4T2GyylWh/TX6px3Bgbgke1igbzJDg4KzurQkkS5KZj38O/Znw6VKgDRGLI9NbFZRsRHDtNmPY47g+4i0RPw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID3U8G7Kx3aE+8YEOLSmRc3Sxv5aTq7UxTuP7g//Ao3cAiAsisGKpopjOFUkaW/xGsNh8/Bozn0clyTmjKiIVyrXQg=="}],"size":1425,"noattachment":false,"key":"/keymirror/-/keymirror-0.1.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"strml","email":"samuel.trace.reed@gmail.com"},"maintainers":[{"name":"strml","email":"samuel.trace.reed@gmail.com"}],"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","publish_time":1401970771565,"_cnpm_publish_time":1401970771565,"dist-tags":{"latest":"0.1.1"}}