{"_id":"firstkey","_rev":"1745786","name":"firstkey","description":"Returns the first key found on an object from a list of keys","dist-tags":{"latest":"0.1.0"},"maintainers":[{"name":"mattesch","email":"matt@mattesch.info"}],"time":{"modified":"2026-11-19T14:34:54.000Z","created":"2012-12-11T19:32:01.794Z","0.1.0":"2012-12-11T19:32:01.794Z"},"users":{},"author":{"name":"Matt-Esch","email":"matt@mattesch.info"},"repository":{"type":"git","url":"git://github.com/Matt-Esch/firstKey.git"},"versions":{"0.1.0":{"name":"firstkey","version":"0.1.0","description":"Returns the first key found on an object from a list of keys","keywords":[],"author":{"name":"Matt-Esch","email":"matt@mattesch.info"},"repository":{"type":"git","url":"git://github.com/Matt-Esch/firstKey.git"},"main":"index","homepage":"https://github.com/Matt-Esch/firstKey","contributors":[{"name":"Matt Esch"}],"bugs":{"url":"https://github.com/Matt-Esch/firstKey/issues","email":"matt@mattesch.info"},"dependencies":{},"devDependencies":{},"licenses":[{"type":"MIT","url":"http://github.com/Matt-Esch/firstKey/raw/master/LICENSE"}],"scripts":{"test":"node ./test"},"readmeFilename":"README.md","_id":"firstkey@0.1.0","dist":{"shasum":"e51f8bbf59a088089fcb41fbbc329901b8e17647","tarball":"http://registry-npm.ywwl.com/firstkey/download/firstkey-0.1.0.tgz","integrity":"sha512-WEIgzbTE3L8e9rk4/WyOlnrHJzx5MA8RpUHvEuEa7Uj4cijCcaDwYhhFTBRfz6IgCm91jmCHhVu4lRq+CKgDLw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC6wB2Bi/hWgFdkAMih3CWJ79IGnVHCIFZ06BnYjFyI5AiEAixNsPp4QQ9wRfa5/AdH7A8nNMT+pjDr42NvrO55KaFM="}],"size":2273,"noattachment":false,"key":"/firstkey/-/firstkey-0.1.0.tgz"},"_npmVersion":"1.1.66","_npmUser":{"name":"mattesch","email":"matt@mattesch.info"},"maintainers":[{"name":"mattesch","email":"matt@mattesch.info"}],"publish_time":1355254321794,"_cnpm_publish_time":1355254321794}},"readme":"# firstKey [![Build Status][1]][2]\n\nReturns the first key found on an object from a list of keys\n\n## Example\n\n        var obj = {\n            word1: 'The',\n            word2: 'quick',\n            word5: 'jumped',\n            word8: 'lazy'\n        },\n        \n        key = firstKey(obj, 'word3', 'word5', 'word7');  // First key found is 'word5'\n\n\nPull the first property from a dom node that exists and reuse that property\n\n - Choosing the text property to use\n\n        var div = document.createElement('div'),\n            text = firstKey(div, 'textContent', 'innerText', 'innerHTML');\n            \n        div[text] = 'Let\\'s use the best property for setting the text';\n    \n - Identifying the vendor-specific property to use, so that you don't set them all needlessly\n \n        var divElement = document.createElement('div'),\n        \n        transformProperty = firstKey(\n            divElement.style,\n            'transform',\n            'webkitTransform',\n            'MozTransform',\n            'oTransform',\n            'msTransform');\n\n        transformOriginProperty = firstKey(\n            divElement.style,\n            'transformOrigin',\n            'webkitTransformOrigin',\n            'MozTransformOrigin',\n            'oTransformOrigin',\n            'msTransformOrigin');\n\n## Installation\n\n`npm install firstkey`\n\n## Contributors\n\n - Matt-Esch\n\n## MIT Licenced\n\n\n  [1]: https://secure.travis-ci.org/Matt-Esch/firstKey.png\n  [2]: http://travis-ci.org/Matt-Esch/firstKey\n","_attachments":{},"readmeFilename":"README.md","homepage":"https://github.com/Matt-Esch/firstKey","bugs":{"url":"https://github.com/Matt-Esch/firstKey/issues","email":"matt@mattesch.info"}}