{"id":17771415,"url":"https://github.com/rootslab/auntie","last_synced_at":"2026-04-26T20:31:46.034Z","repository":{"id":57186779,"uuid":"114059696","full_name":"rootslab/auntie","owner":"rootslab","description":"Auntie, my dear ultra-fast module for untying/splitting/counting a stream of data by a chosen separator sequence.","archived":false,"fork":false,"pushed_at":"2018-03-07T21:15:34.000Z","size":232,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-20T06:22:58.041Z","etag":null,"topics":["boyer-moore","count-lines","csv","csv-parser","csv-stream","nodejs","parser","pattern-search","split-data","splitter","streaming-parser","tsv"],"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":"2017-12-13T01:47:16.000Z","updated_at":"2018-01-22T12:05:09.000Z","dependencies_parsed_at":"2022-09-14T16:22:43.060Z","dependency_job_id":null,"html_url":"https://github.com/rootslab/auntie","commit_stats":null,"previous_names":[],"tags_count":65,"template":false,"template_full_name":null,"purl":"pkg:github/rootslab/auntie","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootslab%2Fauntie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootslab%2Fauntie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootslab%2Fauntie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootslab%2Fauntie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rootslab","download_url":"https://codeload.github.com/rootslab/auntie/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootslab%2Fauntie/sbom","scorecard":{"id":784678,"data":{"date":"2025-08-11","repo":{"name":"github.com/rootslab/auntie","commit":"28de79b3cdca6a0c3e5b1909f92178c27e5d0d00"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"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":"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":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"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":"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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T05:46:22.476Z","repository_id":57186779,"created_at":"2025-08-23T05:46:22.476Z","updated_at":"2025-08-23T05:46:22.476Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32312223,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T19:15:34.056Z","status":"ssl_error","status_checked_at":"2026-04-26T19:15:15.467Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["boyer-moore","count-lines","csv","csv-parser","csv-stream","nodejs","parser","pattern-search","split-data","splitter","streaming-parser","tsv"],"created_at":"2024-10-26T21:32:47.429Z","updated_at":"2026-04-26T20:31:46.015Z","avatar_url":"https://github.com/rootslab.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Auntie\n\n[![NPM VERSION](http://img.shields.io/npm/v/auntie.svg?style=flat)](https://www.npmjs.org/package/auntie)\n[![CODACY BADGE](https://img.shields.io/codacy/b18ed7d95b0a4707a0ff7b88b30d3def.svg?style=flat)](https://www.codacy.com/public/44gatti/auntie)\n[![CODECLIMATE-TEST-COVERAGE](https://img.shields.io/codeclimate/c/rootslab/auntie.svg?style=flat)](https://codeclimate.com/github/rootslab/auntie)\n[![LICENSE](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](https://github.com/rootslab/auntie#mit-license)\n\n![NODE VERSION](https://img.shields.io/node/v/auntie.svg)\n[![TRAVIS CI BUILD](http://img.shields.io/travis/rootslab/auntie.svg?style=flat)](http://travis-ci.org/rootslab/auntie)\n[![BUILD STATUS](http://img.shields.io/david/rootslab/auntie.svg?style=flat)](https://david-dm.org/rootslab/auntie)\n[![DEVDEPENDENCY STATUS](http://img.shields.io/david/dev/rootslab/auntie.svg?style=flat)](https://david-dm.org/rootslab/auntie#info=devDependencies)\n\n[![NPM MONTHLY](http://img.shields.io/npm/dm/auntie.svg?style=flat)](http://npm-stat.com/charts.html?package=auntie)\n[![NPM YEARLY](https://img.shields.io/npm/dy/auntie.svg)](http://npm-stat.com/charts.html?package=auntie)\n[![NPM TOTAL](https://img.shields.io/npm/dt/auntie.svg)](http://npm-stat.com/charts.html?package=auntie)\n\n[![NPM GRAPH](https://nodei.co/npm/auntie.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://nodei.co/npm/auntie/)\n\n\u003e __Auntie__, _my dear_ __ultra-fast__ module for __untying/splitting/counting__\n\u003e a stream of data by a __chosen separator sequence__.\n\n\u003e It uses __[Bop](https://github.com/rootslab/bop)__ under the hood, a **_Boyer-Moore_** parser,\n\u003e optimized for sequence lengths up to 255 bytes.\n\n### Table of Contents\n\n- __[Install](#install)__\n- __[Run Tests](#run-tests)__\n- __[Run Benchmarks](#run-benchmarks)__\n- __[Constructor](#constructor)__\n- __[Properties](#properties)__\n- __[Methods](#methods)__\n    - __[count](#auntiecount)__\n    - __[dist](#auntiedist)__\n    - __[do](#auntiedo)__\n    - __[flush](#auntieflush)__\n    - __[set](#auntieset)__    \n    - __[comb](#auntiecomb)__    \n- __[Events](#events)__\n- __[Examples](#examples)__  \n  - __[split lines (streaming) from a CSV file](#split-lines-from-a-csv-file-crlf)__\n  - __[count lines from a file](#count-lines-from-a-file-crlf)__ \n  - __[snap event and collect](#snap-event-and-collect-crlf)__\n- __[ToDo](/ToDo.md)__\n- __[MIT License](#mit-license)__\n\n------------------------------------------------------------------------------\n\n### Install\n\n```bash\n$ npm install auntie [-g]\n```\n\n\u003e __require__:\n\n```javascript\nconst Auntie  = require( 'auntie' );\n```\n\n### Run Tests\n\n\u003e __to run all test files, install devDependencies:__\n\n```bash\n $ cd auntie/\n # install or update devDependencies\n $ npm install \n # run tests\n $ npm test\n```\n\n\u003e __to execute a single test file, simply do__:\n\n```bash\n $ node test/file-name.js\n```\n\n\u003e __output example and running time__:\n\n```bash\n...\n- current path is 'test'.\n- time elapsed: 106.596 secs.\n\n  26 test files were loaded.\n  26 test files were launched.\n  1272671 assertions succeeded.\n```\n### Run Benchmarks\n\n```bash\n$ cd auntie/\n$ npm run bench\n```\n\n\u003e __to execute a single bench file, simply do__:\n\n```bash\n $ node bench/file-name.js\n```\n\n------------------------------------------------------------------------------\n\n### Constructor\n\n\u003e Arguments between [ ] are optional.\n\n```javascript\nAuntie( [ Buffer | String | Number sequence ] )\n```\n\u003e or\n```javascript\nnew Auntie( [ Buffer | String | Number sequence ] )\n```\n\u003e __NOTE__: default is the `CRLF sequence \\r\\n`.\n\n### Properties\n\n\u003e __NOTE__: do not mess up with these properties.\n\n##### The current sequence for splitting data\n```javascript\nAuntie.seq : Buffer\n```\n\n##### the Boyer-Moore parser, under the hood.\n```javascript\nAuntie.bop : Bop\n```\n\n##### a Boyer-Moore parser, to search for generic (sub)sequences\n```javascript\nAuntie.gbop : Bop\n```\n\n##### the remaining data, without any match found.\n```javascript\nAuntie.snip : Buffer\n```\n\n##### the remaining data, used for counting.\n```javascript\nAuntie.csnip : Buffer\n```\n\n##### the current number of matches, min/max distance, remaining bytes.\n```javascript\nAuntie.cnt : Array\n```\n\n------------------------------------------------------------------------------\n\n### Methods\n\n|            name           |                                 description                                      |\n|:--------------------------|:---------------------------------------------------------------------------------|\n| __[count](#auntiecount)__ | `count (only) how many times the sequence appears in the current data.`          |\n| __[dist](#auntiedist)__   | `count occurrences, min and max distance between sequences and remaining bytes.` |\n| __[do](#auntiedo)__       | `split data or a stream of data by the current sequence.`                        |\n| __[flush](#auntieflush)__ | `flush the remaining data, resetting internal state/counters.`                   |\n| __[set](#auntieset)__     | `set a new sequence for splitting data.`                                         |\n| __[comb](#auntiecomb)__   | `search a char or a sequence into the current data.`                             |\n\n\u003e Arguments between [ ] are optional.\n\n#### Auntie.count\n\u003e ##### the fastest/lightest way to count how many times the sequence appears in the current data.\n```javascript\n/*\n * it returns an Array with the current number of occurrences.\n * \n * NOTE: it saves the minimum necessary data that does not contains\n * the sequence, for the next #count call with fresh data (to check\n * for single occurrences between 2 chunks of data.\n */\n'count' : function ( Buffer data ) : Array\n```\n\n#### Auntie.dist\n\u003e ##### count occurrences, min and max distance between sequences and remaining bytes.\n```javascript\n/*\n * it returns an Array with:\n * - the current number of occurrences \n * - the minimum distance, in bytes, between any 2 sequences\n * - the maximum distance, in bytes, between any 2 sequences\n * - the remaining bytes to the end of data (without any matching sequence)\n * \n * NOTE:\n * - also the distance from index 0 to the first match will be considered\n * - it saves the remaining data that does not contains the sequence,\n *   for the next #dist call with fresh data, to check for occurrences\n *   between chunks).\n */\n'dist' : function ( Buffer data ) : Array\n```\n\n#### Auntie.do\n\u003e ##### split data or a stream of data by the current sequence\n```javascript\n/*\n * if collect is true, it returns an Array of data slices; otherwise, it \n * emits a 'snap' event for every slice; then, after having finished to\n * parse data, it emits a 'snip' event, with the remaining data that does\n * not contain the sequence ( the current Auntie.snip property ).\n *\n * NOTE: it saves the remaining data that does not contains the\n * sequence, for the next #do call on fresh data (to check for \n * occurrences between chunks).\n */\n'do' : function ( Buffer data [, Boolean collect ] ) : [ Array ]\n```\n\n#### Auntie.flush\n\u003e ##### flush the remaining data, resetting internal state/counters\n```javascript\n/*\n * if collect is true it returns a Buffer, otherwise it emits \n * a 'snip' event with data. Obviously the snip doesn't contain\n * the sequence (no match). It is equal to get and reset the\n * internal me.snip property.\n */\n'flush' : function ( [ Boolean collect ] ) : [ Buffer ]\n```\n\n#### Auntie.set\n\u003e ##### set a new sequence for splitting data.\n```javascript\n// default sequence is '\\r\\n' or CRLF sequence.\n'set' : function ( [ Buffer | String | Number sequence ] ) : Auntie\n```\n\n#### Auntie.comb\n\u003e ##### search for a char or a sequence into the current data.\n```javascript\n/*\n * parse current data for a generic sequence. It returns an Array of indexes.\n * NOTE: it doesn't affect the current streaming parser and it doesn't save\n * any data. It simply parses a chunk of data for the specified sequence,\n * optionally from a starting index and limiting results to a specified number\n * of occurrences (like Bop.parse does).\n */\n'comb' : function ( Buffer | String seq, Buffer data [, Number from [, Number limit ] ] ) : Array\n```\n\n------------------------------------------------------------------------------\n\n### Events\n\n\u003e Auntie emits only __2__ types of events: __`snap`__ and __`snip`__.\n\n##### !snap a result.\n```javascript\n'snap' : function ( Buffer result )\n```\n\n##### !snip current remaining data (with no match found).\n```javascript\n'snip' : function ( Buffer result )\n```\n\n\u003e __NOTE__: if the '_collect_' switch for the __do__/__flush__ was set (true),\n\u003e then no event will be emitted.\n\n------------------------------------------------------------------------------\n\n### Examples\n\n#### split lines from a CSV file (CRLF):\n\n\u003e - __[do, comb: streaming data](example/auntie-csv-split-lines-example.js)__\n\n#### count lines from a file (CRLF):\n \n \u003e - __[count: sync load](example/auntie-count-sync-load-example.js)__\n \u003e - __[dist: sync load](example/auntie-dist-sync-load-example.js)__\n \u003e - __[count: streaming data](example/auntie-count-async-stream-example.js)__\n \u003e - __[dist: streaming data](example/auntie-dist-async-stream-example.js)__\n \n#### snap event and collect (CRLF):\n\n \u003e - __[do snap: streaming data](example/auntie-do-snap-event-example.js)__\n \u003e - __[do collect: streaming data](example/auntie-do-collect-results-example.js)__\n\n\u003e See __[ All examples](example/)__.\n\n### MIT License\n\n\u003e Copyright (c) 2017-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.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootslab%2Fauntie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frootslab%2Fauntie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootslab%2Fauntie/lists"}