{"id":13602105,"url":"https://github.com/redis/hiredis-node","last_synced_at":"2025-10-02T12:30:52.426Z","repository":{"id":1197992,"uuid":"1105398","full_name":"redis/hiredis-node","owner":"redis","description":"Node wrapper for hiredis","archived":true,"fork":false,"pushed_at":"2019-11-21T14:28:53.000Z","size":112,"stargazers_count":304,"open_issues_count":14,"forks_count":84,"subscribers_count":23,"default_branch":"master","last_synced_at":"2024-05-02T05:04:47.684Z","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":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/redis.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-11-23T10:10:57.000Z","updated_at":"2023-11-20T05:00:08.000Z","dependencies_parsed_at":"2022-08-16T12:31:24.687Z","dependency_job_id":null,"html_url":"https://github.com/redis/hiredis-node","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redis%2Fhiredis-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redis%2Fhiredis-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redis%2Fhiredis-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redis%2Fhiredis-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redis","download_url":"https://codeload.github.com/redis/hiredis-node/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234850382,"owners_count":18896476,"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":[],"created_at":"2024-08-01T18:01:14.288Z","updated_at":"2025-10-02T12:30:47.135Z","avatar_url":"https://github.com/redis.png","language":"JavaScript","funding_links":[],"categories":["Web 后端"],"sub_categories":[],"readme":"# [Use node-redis](https://github.com/NodeRedis/node_redis)\n\n`hiredis-node` is deprecated, unmaintained and not updated in forever. [Use node-redis](https://github.com/NodeRedis/node_redis).\n\n---\n\n[![Build Status](https://travis-ci.org/redis/hiredis-node.png?branch=master)](https://travis-ci.org/redis/hiredis-node)\n\n# hiredis-node\n\nNode extension that wraps [hiredis][hiredis].\nBecause Node is already good at doing I/O, hiredis-node only provides\nbindings to the protocol parser.\nThe hiredis protocol parser is faster than JavaScript protocol parsers,\nbut the speedup only becomes noticeable for large replies.\nIf you use Redis for simple SET/GET operations, there won't be a big\nbenefit to using hiredis.\nIf you use Redis for big SUNION/SINTER/LRANGE/ZRANGE operations, the\nbenefit to using hiredis-node can be significant.\n\n[hiredis]: http://github.com/redis/hiredis\n\n## Install\n\nInstall with [NPM][npm]:\n\n```\nnpm install hiredis\n```\n\nThis requires:\n* `gcc` / `g++` 4.8 or newer.\n* `python` 2.7 or any newer 2.x version. `python` 3.x is not supported.\n\nFor running on Travis check the bundled [.travis.yml](.travis.yml).\n\n[npm]: https://npmjs.org/\n\n## Contribute\n\nTo work on the code, first fetch the bundled hiredis submodule, then build hiredis and run the tests.\n\n```\ngit submodule update --init\nnpm install\nnpm test\n```\n\n## Usage\n\nhiredis-node works out of the box with Matt Ranney's [node_redis][node_redis].\nThe latter has an optional dependency on hiredis-node, so maybe you're\nalready using it without knowing.\n\nAlternatively, you can use it directly:\n\n```javascript\nvar hiredis = require(\"hiredis\"),\n    reader = new hiredis.Reader();\n\n// Data comes in\nreader.feed(\"$5\\r\\nhello\\r\\n\");\n\n// Reply comes out\nreader.get() // =\u003e \"hello\"\n```\n\nInstead of returning strings for bulk payloads, it can also return\nbuffers:\n\n```javascript\nvar hiredis = require(\"hiredis\"),\n    reader = new hiredis.Reader({ return_buffers: true });\n\n// Data comes in\nreader.feed(\"$5\\r\\nhello\\r\\n\");\n\n// Reply comes out\nreader.get() // =\u003e \u003cBuffer 68 65 6c 6c 6f\u003e\n```\n\n[node_redis]: http://github.com/mranney/node_redis\n\n## Windows\n\nSince Version 0.3.0 hiredis-node officially supports Windows.\nA simple `npm install hiredis` should just work.\nIf not, please open a bug report.\n\nThere's also a [Windows fork][windows_fork] by Dmitry Gorbunos (@fuwaneko), which should now be unnecessary.\n\n[windows_fork]: https://github.com/fuwaneko/hiredis-node\n\n## License\n\nThis code is released under the BSD license, after the license of hiredis.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredis%2Fhiredis-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredis%2Fhiredis-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredis%2Fhiredis-node/lists"}