{"id":17771412,"url":"https://github.com/rootslab/boris","last_synced_at":"2025-03-15T16:30:58.102Z","repository":{"id":16452489,"uuid":"19204366","full_name":"rootslab/boris","owner":"rootslab","description":"Boris, a pure javascript parser for the Redis serialization protocol.","archived":false,"fork":false,"pushed_at":"2018-02-10T14:40:24.000Z","size":59,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-27T03:25:46.152Z","etag":null,"topics":["javascript-parser","nodejs","redis","redis-serialization-protocol"],"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/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-04-27T13:05:57.000Z","updated_at":"2018-11-28T16:52:51.000Z","dependencies_parsed_at":"2022-09-18T23:11:31.943Z","dependency_job_id":null,"html_url":"https://github.com/rootslab/boris","commit_stats":null,"previous_names":[],"tags_count":50,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootslab%2Fboris","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootslab%2Fboris/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootslab%2Fboris/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootslab%2Fboris/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rootslab","download_url":"https://codeload.github.com/rootslab/boris/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243759706,"owners_count":20343611,"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":["javascript-parser","nodejs","redis","redis-serialization-protocol"],"created_at":"2024-10-26T21:32:47.291Z","updated_at":"2025-03-15T16:30:58.090Z","avatar_url":"https://github.com/rootslab.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Boris\n\n[![NPM VERSION](http://img.shields.io/npm/v/boris.svg?style=flat)](https://www.npmjs.org/package/boris)\n[![CODACY BADGE](https://img.shields.io/codacy/b18ed7d95b0a4707a0ff7b88b30d3def.svg?style=flat)](https://www.codacy.com/public/44gatti/boris)\n[![CODECLIMATE-TEST-COVERAGE](https://img.shields.io/codeclimate/c/rootslab/boris.svg?style=flat)](https://codeclimate.com/github/rootslab/boris)\n[![LICENSE](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](https://github.com/rootslab/boris#mit-license)\n\n![NODE VERSION](https://img.shields.io/node/v/boris.svg)\n[![TRAVIS CI BUILD](http://img.shields.io/travis/rootslab/boris.svg?style=flat)](http://travis-ci.org/rootslab/boris)\n[![BUILD STATUS](http://img.shields.io/david/rootslab/boris.svg?style=flat)](https://david-dm.org/rootslab/boris)\n[![DEVDEPENDENCY STATUS](http://img.shields.io/david/dev/rootslab/boris.svg?style=flat)](https://david-dm.org/rootslab/boris#info=devDependencies)\n\n[![NPM MONTHLY](http://img.shields.io/npm/dm/boris.svg?style=flat)](http://npm-stat.com/charts.html?package=boris)\n![NPM YEARLY](https://img.shields.io/npm/dy/boris.svg)\n\n[![NPM GRAPH](https://nodei.co/npm/boris.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://nodei.co/npm/boris/)\n\n\u003e _**Boris**_, a pure javascript parser for the Redis serialization protocol __[RESP](http://redis.io/topics/protocol)__.\n\n\u003e __Boris__ is able to parse all kinds of __Redis__ replies, also __deeply nested multi-bulk__ replies.\n\n### Install\n\n```bash\n$ npm install boris [-g]\n// clone repo\n$ git clone git@github.com:rootslab/boris.git\n```\n\u003e __require__ \n\n```javascript\nvar Boris = require( 'boris' );\n```\n\u003e See [examples](example/).\n\n### Run Tests\n\n```bash\n$ cd boris/\n$ npm test\n```\n### Constructor\n\n\u003e Create an instance.\n\n```javascript\nvar b = Boris()\n// or\nvar b = new Boris()\n```\n#### Options\n\n\u003e Default options are listed.\n\n```javascript\nopt = {\n    /*\n     * For default, the parser returns Buffers,\n     */\n    return_buffers : true\n}\n```\n\n### Properties\n\n\u003e __WARNING__: Don't mess with these properties.\n\n```javascript\n/*\n * Protocol rules: bulk, multibulk, status, integer, error.\n */\nBoris.rules : Object\n\n/*\n * Current rule in execution.\n */\nBoris.crule : Rule\n\n/*\n * Current parser data.\n */\nBoris.cdata : Buffer\n\n/*\n * Boolean to signal that data is fragmented,\n * then another chunk is expected.\n */\nBoris.mchk : Boolean\n\n/*\n * Current parser position in the data.\n */\nBoris.cpos : Number\n\n/*\n * Current parser stack for multibulk replies.\n */\nBoris.peela : Peela\n```\n\n### Methods\n\n\u003e Arguments within [ ] are optional.\n\n```javascript\n/*\n * parse a chunk of data.\n */\nBoris#parse( Buffer data ) : undefined\n\n/*\n * reset parser state.\n */\nBoris#reset() : undefined\n\n```\n\n### Events\n\n```javascript\n/*\n * The current executing rule has found a result.\n * The convert function argument is an utility that\n * scans an array and turns all Buffers into Strings.\n *\n * NOTE: the boolean 'isError' signals a Redis error reply,\n * not a runtime Error.\n */\nBoris.on( 'match', function ( Boolean isError, Array result, Function convert ) { .. } )\n\n/*\n * A parse error occurred, the parser wasn't able to recognize\n * the current control char.\n *\n * NOTE: on error, parser state ( stack, rules ) will be reset.\n */\nBoris.on( 'error', function ( String emsg, Buffer data ) { .. } )\n\n/*\n * NOTE: events below are disabled for perfomance reasons.\n * If you need them, decomment statements in the code.\n */\n\n/*\n * the current executing rule needs further data to continue.\n */\nBoris.on( 'miss', function ( Rule rule, Number position ) { .. } )\n\n/*\n * Data was totally parsed.\n */\nBoris.on( 'end', function () { .. } )\n\n``` \n\n------------------------------------------------------------------------\n\n### MIT License\n\n\u003e Copyright (c) 2013 \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%2Fboris","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frootslab%2Fboris","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootslab%2Fboris/lists"}