{"id":18456699,"url":"https://github.com/damirka/redis-type","last_synced_at":"2025-04-08T04:35:10.626Z","repository":{"id":46214721,"uuid":"139143500","full_name":"damirka/redis-type","owner":"damirka","description":"Redis type wrapper. Promises inside","archived":false,"fork":false,"pushed_at":"2022-12-10T20:22:39.000Z","size":715,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T14:01:40.329Z","etag":null,"topics":["node-redis","nodejs","nodejs-redis","promise","redis"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/redis-type","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/damirka.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-29T11:52:57.000Z","updated_at":"2023-10-08T00:42:21.000Z","dependencies_parsed_at":"2023-01-26T10:45:58.423Z","dependency_job_id":null,"html_url":"https://github.com/damirka/redis-type","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damirka%2Fredis-type","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damirka%2Fredis-type/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damirka%2Fredis-type/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damirka%2Fredis-type/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/damirka","download_url":"https://codeload.github.com/damirka/redis-type/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247779795,"owners_count":20994569,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["node-redis","nodejs","nodejs-redis","promise","redis"],"created_at":"2024-11-06T08:12:30.446Z","updated_at":"2025-04-08T04:35:09.846Z","avatar_url":"https://github.com/damirka.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# redis-type - redis type wrapper  \n\n[Full API Reference](https://damirka.github.io/redis-type/)\n\nThis small library gives you Promises and (!) JS-like wrappers for Redis types.\n```\nRedis HASH -\u003e JS Map    // have you ever thought they are so similar?\nRedis LIST -\u003e JS Array  // this one is a bit obvious\nRedis SET  -\u003e JS Set    // and this one even more!\n```\n\n## Install and use\n\nAs all the npm packages, this one is installed like this:\n```sh\n$ npm install --save redis-type\n```\n\nTo use this library, you have to include redis-type in your JS code and initialize it with Redis client.\n\n```JavaScript\n\n// The first one\nconst redis  = require('redis');\nconst client = redis.createClient();\n\n// Initialize library with a client (!)\nconst types  = require('redis-type')(client);\n\n// Choose the types you are going to use: Hash, List or Set\nconst Hash   = types.Hash;\nconst Set    = types.Set;   // this assignment will rewrite global.Set - be careful\nconst List   = types.List;\n\nconst users  = new Hash('users', true); // second argument is for JSON processing\n\n(async () =\u003e {\n\n    const allUsers = await users.getAll();\n\n    await users.set('sam', { name: 'Sam', age: '19' });\n\n    const sam = await users.get('sam');\n\n})();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamirka%2Fredis-type","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdamirka%2Fredis-type","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamirka%2Fredis-type/lists"}