{"_id":"keyf","_rev":"3636036","name":"keyf","description":"key formatter based on a function's arguments","dist-tags":{"latest":"0.0.2"},"maintainers":[{"name":"ktmud","email":"jyyjcc@gmail.com"}],"time":{"modified":"2024-10-21T06:08:07.000Z","created":"2014-03-24T11:32:54.201Z","0.0.2":"2014-03-25T03:34:13.056Z","0.0.1":"2014-03-24T11:32:54.201Z"},"users":{},"author":{"name":"ktmud","email":"kissmud@gmail.com"},"repository":{"type":"git","url":"git://github.com/ktmud/keyf"},"versions":{"0.0.2":{"name":"keyf","version":"0.0.2","description":"key formatter based on a function's arguments","main":"index.js","scripts":{"test":"mocha --reporter spec"},"repository":{"type":"git","url":"git://github.com/ktmud/keyf"},"keywords":["arguments","replace","formatter","key","format","formatting","replacement"],"devDependencies":{"mocha":"*","should":"*"},"author":{"name":"ktmud","email":"kissmud@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/ktmud/keyf/issues"},"homepage":"https://github.com/ktmud/keyf","_id":"keyf@0.0.2","dist":{"shasum":"4840887aa1c760a94a4a5ac9eb0302dda8eabe4d","size":1580,"noattachment":false,"key":"/keyf/-/keyf-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/keyf/download/keyf-0.0.2.tgz"},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"ktmud","email":"jyyjcc@gmail.com"},"maintainers":[{"name":"ktmud","email":"jyyjcc@gmail.com"}],"directories":{},"_cnpmcore_publish_time":"2021-12-23T12:55:44.697Z","publish_time":1395718453056,"_cnpm_publish_time":1395718453056},"0.0.1":{"name":"keyf","version":"0.0.1","description":"key formatter based on a function's arguments","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/ktmud/keyf"},"keywords":["arguments","replace","formatter","key","format","formatting","replacement"],"author":{"name":"ktmud","email":"kissmud@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/ktmud/keyf/issues"},"homepage":"https://github.com/ktmud/keyf","_id":"keyf@0.0.1","dist":{"shasum":"72be95712fe105bd7bcc97f1459f05517b828e79","size":1212,"noattachment":false,"key":"/keyf/-/keyf-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/keyf/download/keyf-0.0.1.tgz"},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"ktmud","email":"jyyjcc@gmail.com"},"maintainers":[{"name":"ktmud","email":"jyyjcc@gmail.com"}],"directories":{},"_cnpmcore_publish_time":"2021-12-23T12:55:43.838Z","publish_time":1395660774201,"_cnpm_publish_time":1395660774201}},"readme":"# keyf\n\nKey formatter for function arguments\n\n## Usage\n\n```javascript\nvar keyf = require('keyf')\nvar formatter = keyf('some-prefix:{_abc_}:{0}:{this.foo}:{1.bar}', {\n  '_abc_': 'pre-defined-value'\n})\n\nUser.prototype.foo = 'abc'\n\nUser.prototype.cacheKey = function() {\n return formatter.call(this, arguments)\n}\nvar user = new User()\n\nuser.cacheKey(1, { bar: '2' })\n// -> some-prefix:pre-defined-value:1:abc:2\n```\n\n## License\n\nthe MIT license.\n","_attachments":{},"homepage":"https://github.com/ktmud/keyf","bugs":{"url":"https://github.com/ktmud/keyf/issues"},"license":"MIT"}