{"id":28365314,"url":"https://github.com/toolbuilder/dynamic-ring-buffer","last_synced_at":"2026-01-31T03:31:52.410Z","repository":{"id":57167190,"uuid":"269231972","full_name":"toolbuilder/dynamic-ring-buffer","owner":"toolbuilder","description":"ring buffer that manages memory in chunks to support large capacity for data bursts with low overhead when small","archived":false,"fork":false,"pushed_at":"2024-11-08T23:27:08.000Z","size":442,"stargazers_count":2,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-12T23:58:27.932Z","etag":null,"topics":[],"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/toolbuilder.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-04T01:27:07.000Z","updated_at":"2024-11-08T23:27:12.000Z","dependencies_parsed_at":"2024-11-09T00:32:46.349Z","dependency_job_id":null,"html_url":"https://github.com/toolbuilder/dynamic-ring-buffer","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/toolbuilder/dynamic-ring-buffer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toolbuilder%2Fdynamic-ring-buffer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toolbuilder%2Fdynamic-ring-buffer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toolbuilder%2Fdynamic-ring-buffer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toolbuilder%2Fdynamic-ring-buffer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/toolbuilder","download_url":"https://codeload.github.com/toolbuilder/dynamic-ring-buffer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toolbuilder%2Fdynamic-ring-buffer/sbom","scorecard":{"id":894217,"data":{"date":"2025-08-11","repo":{"name":"github.com/toolbuilder/dynamic-ring-buffer","commit":"64bb2eae8cf7760ef38833d3f867962c0df6bf84"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.4,"checks":[{"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":"Code-Review","score":0,"reason":"Found 0/22 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":"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":"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":"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":"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":"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":"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":"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":"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":"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":5,"reason":"5 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6"],"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-24T13:03:37.710Z","repository_id":57167190,"created_at":"2025-08-24T13:03:37.710Z","updated_at":"2025-08-24T13:03:37.710Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28928148,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T02:59:34.861Z","status":"ssl_error","status_checked_at":"2026-01-31T02:59:05.369Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2025-05-28T21:10:37.599Z","updated_at":"2026-01-31T03:31:52.403Z","avatar_url":"https://github.com/toolbuilder.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DynamicRingBuffer\n\nDynamicRingBuffer implements classic fixed length ring buffer, or circular queue. Memory is dynamically allocated and deallocated in chunks as the buffer grows and shrinks. This allows the buffer to have a large capacity to handle data bursts, while minimizing memory use during normal operation.\n\nWhen the buffer length reaches capacity, the oldest values are quietly thrown away. The methods match the Array signature for push, pop, unshift, and shift. For buffer operation either use push/shift together, or unshift/pop together.\n\n`DynamicRingBuffer` is a minimal implementation developed for use with [Await-For-It](https://github.com/toolbuilder/await-for-it) iterable queues.\n\nThere are two related buffers:\n\n* [RingBuffer](https://github.com/toolbuilder/ring-buffer) ring buffer with fixed maximum size - faster than Array as a buffer.\n* [PriorityBuffer](https://github.com/toolbuilder/priority-buffer) that uses your comparator to buffer items in priority order.\n\nThere are lots of ring buffer implementations on NPM. This implementation:\n\n* Dynamically allocates and deallocates in chunks to reduce memory use when not needed.\n* Drop in replacement for `Array` to convert a buffer to a ring buffer.\n* Defines `exports` and `module` properties in `package.json` pointing to the ES source for bundlers.\n* Dual module that provides both ES and CommonJS entry points.\n* Provides `Symbol.iterator` generator.\n\n## Installation\n\n```bash\nnpm install --save @toolbuilder/dynamic-ring-buffer\n```\n\n## Getting Started\n\nThe API documentation is [here](docs/dynamic-ring-buffer.md).  This is a quick example to get you started.\n\n```javascript\nimport { DynamicRingBuffer } from '@toolbuilder/dynamic-ring-buffer'\nconst log = console.log\n\nconst ringBuffer = new DynamicRingBuffer(100, 10000) // max length 10000 in chunks of 100\nlog(ringBuffer.length) // prints 0\n\n['A', 'B', 'C'].forEach(x =\u003e ringBuffer.push(x))\nlog(ringBuffer.length) // prints 3\nlog(ringBuffer.front()) // prints 'A'\nlog(ringBuffer.back()) // prints 'C'\nlog(ringBuffer.shift()) // pulls 'A' off front and prints 'A'\nlog(ringBuffer.length) // prints 2\nlog([...ringBuffer]) // prints ['B', 'C']\nlog(ringBuffer.length) // prints 2\n```\n\n## Alternatives\n\nThere are **lots** of alternatives on npm.\n\n## Contributing\n\nContributions are welcome. Please create a pull request.\n\n* I use [pnpm](https://pnpm.js.org/) instead of npm.\n* Run the unit tests with `pnpm test`\n* Package verification requires [pnpm](https://pnpm.io/) to be installed globally.\n  * `npm install -g pnpm`\n  * `pnpm install`\n  * `pnpm test` to run unit tests\n  * `pnpm run check:packfile` to test the pack file against Node ES and CommonJS projects, as well as Electron.\n  * `pnpm run check` to validate the package is ready for commit\n\n## Issues\n\nThis project uses Github issues.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoolbuilder%2Fdynamic-ring-buffer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoolbuilder%2Fdynamic-ring-buffer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoolbuilder%2Fdynamic-ring-buffer/lists"}