{"id":15297191,"url":"https://github.com/rootslab/hiboris","last_synced_at":"2026-05-09T10:40:23.863Z","repository":{"id":17725817,"uuid":"20556548","full_name":"rootslab/hiboris","owner":"rootslab","description":"a utility module to load Hiredis native parser, or to fall back to Boris, a pure JS parser.","archived":false,"fork":false,"pushed_at":"2018-02-10T14:40:51.000Z","size":25,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-21T14:08:20.596Z","etag":null,"topics":["boris","hiredis","node-js","redis","redis-protocol"],"latest_commit_sha":null,"homepage":null,"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/rootslab.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":"2014-06-06T08:26:47.000Z","updated_at":"2017-12-05T12:30:56.000Z","dependencies_parsed_at":"2022-07-05T16:32:51.162Z","dependency_job_id":null,"html_url":"https://github.com/rootslab/hiboris","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootslab%2Fhiboris","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootslab%2Fhiboris/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootslab%2Fhiboris/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootslab%2Fhiboris/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rootslab","download_url":"https://codeload.github.com/rootslab/hiboris/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245467614,"owners_count":20620216,"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":["boris","hiredis","node-js","redis","redis-protocol"],"created_at":"2024-09-30T19:15:36.086Z","updated_at":"2026-05-09T10:40:23.798Z","avatar_url":"https://github.com/rootslab.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Hiboris\n\n[![NPM VERSION](http://img.shields.io/npm/v/hiboris.svg?style=flat)](https://www.npmjs.org/package/hiboris)\n[![CODACY BADGE](https://img.shields.io/codacy/b18ed7d95b0a4707a0ff7b88b30d3def.svg?style=flat)](https://www.codacy.com/public/44gatti/hiboris)\n[![CODECLIMATE-TEST-COVERAGE](https://img.shields.io/codeclimate/c/rootslab/hiboris.svg?style=flat)](https://codeclimate.com/github/rootslab/hiboris)\n[![LICENSE](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](https://github.com/rootslab/hiboris#mit-license)\n\n![NODE VERSION](https://img.shields.io/node/v/hiboris.svg)\n[![TRAVIS CI BUILD](http://img.shields.io/travis/rootslab/hiboris.svg?style=flat)](http://travis-ci.org/rootslab/hiboris)\n[![BUILD STATUS](http://img.shields.io/david/rootslab/hiboris.svg?style=flat)](https://david-dm.org/rootslab/hiboris)\n[![DEVDEPENDENCY STATUS](http://img.shields.io/david/dev/rootslab/hiboris.svg?style=flat)](https://david-dm.org/rootslab/hiboris#info=devDependencies)\n\n[![NPM MONTHLY](http://img.shields.io/npm/dm/hiboris.svg?style=flat)](http://npm-stat.com/charts.html?package=hiboris)\n![NPM YEARLY](https://img.shields.io/npm/dy/hiboris.svg)\n\n[![NPM GRAPH](https://nodei.co/npm/hiboris.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://nodei.co/npm/hiboris/)\n\n\u003e **_Hiboris_**, a utility module to load __[hiredis](https://github.com/redis/hiredis-node)__ _native parser_, or to fall back to __[Boris](https://github.com/rootslab/boris)__, _a pure JS parser_.\n\n\u003e __NOTE__: This module was developed for and used by __[♠ Spade](https://github.com/rootslab/spade)__, a __full-featured__ modular client for __Redis__.\n\n### Install\n\n```bash\n$ npm install hiboris [-g]\n// clone repo\n$ git clone git@github.com:rootslab/hiboris.git\n```\n__install and update devDependencies (hiredis)__:\n\n```bash\n $ cd hiboris/\n $ npm install\n # update\n $ npm update\n```\n\u003e __require__:\n\n```javascript\nvar Hiboris  = require( 'hiboris' );\n```\n\n### Run Tests\n\n\u003e __NOTE__: Install _devDependencies_ before running tests, see above.\n\n```bash\n$ cd hiboris/\n$ npm test\n```\n\n### Constructor\n\n\u003e Create an instance, the argument within [ ] is optional.\n\n```javascript\n/*\n * NOTE: if hiredis module is not available, it falls back\n * to use pure JS parser, and returns an instance of Boris.\n */\nHiboris( [ Object opt ] ) : Hiboris | Boris\n// or\nnew Hiboris( [ Object opt ] ) : Hiboris | Boris\n```\n#### Options\n\n\u003e Default options are listed.\n\n```javascript\nopt = {\n    /*\n     * For default the hiredis native parser is disabled.\n    */\n    hiredis : false\n\n    /*\n     * For default, the parser returns strings instead of buffers,\n     * returning buffers will slowdown hiredis parsing of about ~60%. \n     */\n    , return_buffers : false\n}\n```\n\n### Sample Usage\n\n\u003e See [examples](example/).\n\n### Methods\n\n\u003e Arguments within [ ] are optional.\n\n```javascript\n/*\n * parse a chunk of data.\n */\nHiboris#parse( Buffer data ) : undefined\n\n/*\n * reset parser state.\n */\nHiboris#reset() : undefined\n\n```\n\n### Events\n\n```javascript\n/*\n * Parser has found some data.\n * \n * NOTE: The 'convert' function argument is a shortcut to Bolgia#reveal\n * utility, it scans an array and turns all Buffers into Strings or Numbers.\n *\n * NOTE: the boolean 'isError' signals a Redis error reply, not a runtime Error.\n */\n'match' : function ( Boolean isError, Array result, Function convert ) : undefined\n\n/*\n * A parsing error has occurred.\n *\n * NOTE: on error, parser state will be reset.\n */\n'error' : function ( Error err ) : undefined\n```\n\n------------------------------------------------------------------------\n\n\n### MIT License\n\n\u003e Copyright (c) 2013-present \u0026lt; Guglielmo Ferri : 44gatti@gmail.com \u0026gt;\n\n\u003e Permission is hereby granted, free of charge, to any person obtaining\n\u003e a copy of this software and associated documentation files (the\n\u003e 'Software'), to deal in the Software without restriction, including\n\u003e without limitation the rights to use, copy, modify, merge, publish,\n\u003e distribute, sublicense, and/or sell copies of the Software, and to\n\u003e permit persons to whom the Software is furnished to do so, subject to\n\u003e the following conditions:\n\n\u003e __The above copyright notice and this permission notice shall be\n\u003e included in all copies or substantial portions of the Software.__\n\n\u003e THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n\u003e EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n\u003e MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n\u003e IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n\u003e CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n\u003e TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n\u003e SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootslab%2Fhiboris","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frootslab%2Fhiboris","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootslab%2Fhiboris/lists"}