{"id":13624768,"url":"https://github.com/chriso/redback","last_synced_at":"2025-10-11T10:59:17.891Z","repository":{"id":1479542,"uuid":"1724654","full_name":"chriso/redback","owner":"chriso","description":"A high-level Redis library","archived":false,"fork":false,"pushed_at":"2016-12-16T01:16:14.000Z","size":223,"stargazers_count":541,"open_issues_count":2,"forks_count":46,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-09-24T20:31:13.287Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chriso.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-05-09T20:49:18.000Z","updated_at":"2024-07-10T18:59:36.000Z","dependencies_parsed_at":"2022-07-29T17:48:54.140Z","dependency_job_id":null,"html_url":"https://github.com/chriso/redback","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/chriso/redback","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chriso%2Fredback","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chriso%2Fredback/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chriso%2Fredback/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chriso%2Fredback/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chriso","download_url":"https://codeload.github.com/chriso/redback/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chriso%2Fredback/sbom","scorecard":{"id":280409,"data":{"date":"2025-08-11","repo":{"name":"github.com/chriso/redback","commit":"1529cbf2bfa31e2479bf7c1f81df0a48c730cc63"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":1,"reason":"Found 3/28 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-35q2-47q7-3pc3"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 5 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T15:40:00.589Z","repository_id":1479542,"created_at":"2025-08-17T15:40:00.589Z","updated_at":"2025-08-17T15:40:00.589Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006875,"owners_count":26084209,"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","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-08-01T21:01:46.172Z","updated_at":"2025-10-11T10:59:17.862Z","avatar_url":"https://github.com/chriso.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Redback\n\n[![NPM version][npm-image]][npm-url]\n[![Build Status][travis-image]][travis-url]\n[![Downloads][downloads-image]][npm-url]\n\nA high-level Redis library.\n\n```sh\n$ npm install redback\n```\n\n## Introduction\n\nRedback provides an accessible and extensible interface to the Redis\n[data types](http://redis.io/topics/data-types) and allows you to create\nyour own structures with ease. Redback comes with the following built-in\nstructures: **List**,  **Set**, **SortedSet**, **Hash**, **Channel**, **Cache**\n\nIt also comes with the following advanced data structures:\n\n- **DensitySet** - A sorted set where adding an element increments its score and removing it decrements it\n- **KeyPair** - Uses two hash structures and an auto-incrementing key to assign an ID to each unique value\n- **SocialGraph** - Similar to Twitter's (following vs. followers)\n- **CappedList** - A list with a fixed length\n- **Queue** - A simple FIFO or LIFO queue\n- **RateLimit** - Count the number of times an event occurs over an interval. See [this introduction](https://gist.github.com/chriso/54dd46b03155fcf555adccea822193da).\n- **BloomFilter** - A probabilistic structure used to test whether an an element exists in a set\n\n## Usage\n\n```javascript\nvar redback = require('redback').createClient();\n\n// or\n\nvar redis = require('redis').createClient();\nvar redback = require('redback').use(redis);\n```\n\n```javascript\nvar user3 = redback.createSocialGraph(3);\nuser3.follow(1, callback);\n\nvar log = redback.createCappedList('log', 1000);\nlog.push('Log message ...');\n\nvar user = redback.createHash('user1');\nuser.set({username: 'chris', password: 'foobar'}, callback);\n```\n\n## Creating your own structures\n\nUse `addStructure(name, methods)` to create your own structure.\n\nLet's create a queue that can be either FIFO or LIFO:\n\n```javascript\nredback.addStructure('SimpleQueue', {\n    init: function (options) {\n        options = options || {};\n        this.fifo = options.fifo;\n    },\n    add: function (value, callback) {\n        this.client.lpush(this.key, value, callback);\n    },\n    next: function (callback) {\n        var method = this.fifo ? 'rpop' : 'lpop';\n        this.client[method](this.key, callback);\n    }\n});\n```\n\nCall `createSimpleQueue(key, options)` to use the queue:\n\n```javascript\nvar queue = redback.createSimpleQueue('my_queue', {fifo: true});\nqueue.add('awesome!');\n```\n\nStructures have access to a Redis key `this.key` and the Redis client\n`this.client`. If an `init()` method is defined then it is called after\nthe structure is instantiated. Also note that `init()` receives any extra parameters\nfrom `create\u003cstructure\u003e()`.\n\n## Other uses\n\n**Cache backend**\n\n```javascript\nvar cache = redback.createCache(namespace);\ncache.set('foo', 'bar', callback);\ncache.get('foo', function (err, foo) {\n    console.log(foo); //bar\n});\n```\n\n**Pub/sub provider**\n\n```javascript\nvar channel = redback.createChannel('chat').subscribe();\n\n//To received messages\nchannel.on('message', function (msg) {\n   console.log(msg);\n});\n\n//To send messages\nchannel.publish(msg);\n```\n\n## Documentation\n\nSee the [annotated source](http://chriso.github.io/redback/api.html).\n\n## Tests\n\nThe tests require a local redis instance running on `localhost:6379`. Note that\nredis database #11 will be flushed prior to each run.\n\n```sh\n$ npm test\n```\n\n## Credits\n\n- Matt Ranney for his [node_redis](https://github.com/mranney/node_redis) library.\n- GitHub user [sreeix](https://github.com/sreeix) for the bloom filter implementation.\n\n## License\n\nMIT\n\n\n[downloads-image]: http://img.shields.io/npm/dm/redback.svg\n[npm-url]: https://npmjs.org/package/redback\n[npm-image]: http://img.shields.io/npm/v/redback.svg\n[travis-url]: https://travis-ci.org/chriso/redback\n[travis-image]: http://img.shields.io/travis/chriso/redback.svg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchriso%2Fredback","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchriso%2Fredback","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchriso%2Fredback/lists"}