{"_id":"storeman","_rev":"3636034","name":"storeman","description":"Simple storage API unifier with prefix support","dist-tags":{"latest":"0.1.2"},"maintainers":[{"name":"ktmud","email":"jyyjcc@gmail.com"}],"time":{"modified":"2024-10-21T06:08:07.000Z","created":"2014-02-28T06:21:58.843Z","0.1.2":"2014-05-02T07:05:10.005Z","0.1.1":"2014-04-28T03:19:12.573Z","0.0.3":"2014-03-02T14:34:47.605Z","0.0.1":"2014-02-28T06:21:58.843Z"},"users":{},"author":{"name":"ktmud","email":"kissmud@gmail.com"},"repository":{"type":"git","url":"git://github.com/ktmud/storeman"},"versions":{"0.1.2":{"name":"storeman","version":"0.1.2","description":"Simple storage API unifier with prefix support","main":"lib/storeman.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git://github.com/ktmud/storeman"},"keywords":["storage","cache","redis","levelup","jsonize"],"dependencies":{"after":"0.8.x","debug":"0.7.x"},"devDependencies":{"lru-cache":"*","istanbul":"*","mocha":"*"},"author":{"name":"ktmud","email":"kissmud@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/ktmud/storeman/issues"},"config":{"travis-cov":{"threshold":70},"blanket":{"pattern":"storeman/lib/"}},"homepage":"https://github.com/ktmud/storeman","_id":"storeman@0.1.2","_shasum":"2e6bbfd9ce591b6ebc09e05376eacd16b592697c","_from":".","_npmVersion":"1.4.7","_npmUser":{"name":"ktmud","email":"jyyjcc@gmail.com"},"maintainers":[{"name":"ktmud","email":"jyyjcc@gmail.com"}],"dist":{"shasum":"2e6bbfd9ce591b6ebc09e05376eacd16b592697c","size":3992,"noattachment":false,"key":"/storeman/-/storeman-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/storeman/download/storeman-0.1.2.tgz"},"directories":{},"_cnpmcore_publish_time":"2021-12-23T18:52:32.444Z","publish_time":1399014310005,"_cnpm_publish_time":1399014310005},"0.1.1":{"name":"storeman","version":"0.1.1","description":"Simple storage API unifier with prefix support","main":"lib/storeman.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git://github.com/ktmud/storeman"},"keywords":["storage","cache","redis","levelup","jsonize"],"dependencies":{"after":"0.8.x","debug":"0.7.x"},"devDependencies":{"lru-cache":"*","istanbul":"*","mocha":"*"},"author":{"name":"ktmud","email":"kissmud@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/ktmud/storeman/issues"},"config":{"travis-cov":{"threshold":70},"blanket":{"pattern":"storeman/lib/"}},"homepage":"https://github.com/ktmud/storeman","_id":"storeman@0.1.1","dist":{"shasum":"ffc104d1f2c3506aa8f41e6f031fd4a5479f3d92","size":3993,"noattachment":false,"key":"/storeman/-/storeman-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/storeman/download/storeman-0.1.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-23T18:52:31.578Z","publish_time":1398655152573,"_cnpm_publish_time":1398655152573},"0.0.3":{"name":"storeman","version":"0.0.3","description":"Simple storage API unifier with prefix support","main":"lib/storeman.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/ktmud/storeman"},"keywords":["storage","cache","redis","levelup","jsonize"],"dependencies":{"after":"0.8.x","debug":"0.7.x"},"author":{"name":"ktmud","email":"kissmud@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/ktmud/storeman/issues"},"homepage":"https://github.com/ktmud/storeman","_id":"storeman@0.0.3","dist":{"shasum":"8bf928dd6d39ea3573241740982ea1be2c0a24e9","size":2753,"noattachment":false,"key":"/storeman/-/storeman-0.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/storeman/download/storeman-0.0.3.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-23T18:52:30.499Z","publish_time":1393770887605,"_cnpm_publish_time":1393770887605},"0.0.1":{"name":"storeman","version":"0.0.1","description":"Simple storage API unifier with prefix support","main":"lib/storeman.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/ktmud/storeman"},"keywords":["storage","cache","redis","levelup","jsonize"],"dependencies":{"debug":"0.7.x"},"author":{"name":"ktmud","email":"kissmud@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/ktmud/storeman/issues"},"homepage":"https://github.com/ktmud/storeman","_id":"storeman@0.0.1","dist":{"shasum":"c53e29232e1dff521787b2fef7caafe05e513a1a","size":2490,"noattachment":false,"key":"/storeman/-/storeman-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/storeman/download/storeman-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-23T18:52:29.422Z","publish_time":1393568518843,"_cnpm_publish_time":1393568518843}},"readme":"# Storeman\n\nA man to help you unify API for mischellaneous storage engines.\n\nProvide a handful set of of useful methods: `get`, `set` *(with ttl)*, `del`, `mget`. \n\nWith built-in [Redis](https://github.com/mranney/node_redis/) and\n[LevelUP](https://github.com/rvagg/node-levelup) support.\n\n## Usage\n\n```javascript\nvar Storeman = require('storeman')\nvar Redis = require('redis')\nvar levelup = require('levelup')\n\n// cache with Redis\nvar cache = new Storeman({\n    prefix: 'cache:',\n    client: Redis.createClient(),\n    encode: function(data){\n        return JSON.stringify(data)\n    },\n    decode: function(data) {\n        return JSON.parse(data)\n    }\n})\n\n// persistent storage with leveldb\nvar store = new Storeman({\n    prefix: 'store:',\n    client: levelup('./var/leveldb')\n})\n```\n\n## API\n\nThe main purpose of this module is to provide a higher level of consistent API over\ndifferent storage clients. That means:\n\n  - consistent method name\n  - consistent function signature\n  - consistent return results\n\nAll methods include:\n\n### store.get(key, callback)\n\nWill `callback(null, undefined)` when no data is found,\nnot return a `null` (as redis does) or emit an error (as leveldb does).\nThis behavior is for in case you want really set data as `null`.\n\n### store.set(key, value, [ttl], callback)\n\nThe client is responsible for handling `ttl`, Storeman will not do this for you.\n\n### store.del(key, callback)\n\nSupports batch delete by passing an Array as `key`.\n\n\n## License\n\nthe MIT license.\n","_attachments":{},"homepage":"https://github.com/ktmud/storeman","bugs":{"url":"https://github.com/ktmud/storeman/issues"},"license":"MIT"}