{"id":19979145,"url":"https://github.com/tarunbatra/rangr","last_synced_at":"2026-04-19T15:32:58.122Z","repository":{"id":53192192,"uuid":"276351212","full_name":"tarunbatra/rangr","owner":"tarunbatra","description":"Manage ranges and overlaps between them","archived":false,"fork":false,"pushed_at":"2021-04-01T16:36:19.000Z","size":89,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-01T14:17:41.472Z","etag":null,"topics":["leetcode","overlapping","range","set"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/rangr","language":"TypeScript","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/tarunbatra.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":"2020-07-01T10:45:44.000Z","updated_at":"2023-03-04T11:31:03.000Z","dependencies_parsed_at":"2022-09-14T18:02:06.602Z","dependency_job_id":null,"html_url":"https://github.com/tarunbatra/rangr","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tarunbatra/rangr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarunbatra%2Frangr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarunbatra%2Frangr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarunbatra%2Frangr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarunbatra%2Frangr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tarunbatra","download_url":"https://codeload.github.com/tarunbatra/rangr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarunbatra%2Frangr/sbom","scorecard":{"id":869119,"data":{"date":"2025-08-11","repo":{"name":"github.com/tarunbatra/rangr","commit":"9eac3c02332e133dee3c24af1f786e14112249d5"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"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":"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":"Pinned-Dependencies","score":5,"reason":"dependency not pinned by hash detected -- score normalized to 5","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/tarunbatra/rangr/main.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/tarunbatra/rangr/main.yml/master?enable=pin","Info:   0 out of   1 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   1 out of   1 npmCommand dependencies pinned"],"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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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/6 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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/main.yml:1","Info: no jobLevel write permissions found"],"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":"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":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.1.0 not signed: https://api.github.com/repos/tarunbatra/rangr/releases/28134001","Warn: release artifact v0.1.0 does not have provenance: https://api.github.com/repos/tarunbatra/rangr/releases/28134001"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"18 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-2j2x-2gpw-g8fm","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-hxcc-f52p-wc94"],"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-24T03:36:50.938Z","repository_id":53192192,"created_at":"2025-08-24T03:36:50.938Z","updated_at":"2025-08-24T03:36:50.938Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32012073,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["leetcode","overlapping","range","set"],"created_at":"2024-11-13T03:36:48.276Z","updated_at":"2026-04-19T15:32:58.073Z","avatar_url":"https://github.com/tarunbatra.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![logo][logo-image]\n\n[![build status][build-image]][build-url]\n[![coverage status][codecov-image]][codecov-url]\n[![npm version][npm-image]][npm-url]\n![language][lang-image]\n\nrangr is a tool to manage ranges and sets. It's inspired from the LeetCode's [Merge Interval][leetcode-problem-url] problem.\n\n⚠️ NOT ready for production use.\n\n## Usage\n\n```typescript\nimport Rangr from 'rangr';\n\nconst range: Rangr = new Rangr([ [1,3], [2,6], [8,10], [15,18] ]);\nconsole.log(range.toString());\n// [1,6],[8,10],[15,18]\n\nrange.add([ [ 10, 11 ], [11, 20] ]);\nconsole.log(range.toString());\n// [1,6],[8,20]\n```\n\n## Features\n\n### Array output\nTo get ranges as an array, use `.toArray()` method provided.\n\nExample:\n```typescript\nconst range: Rangr = new Rangr([ [1,3], [2,6] ]);\nconst arr = range.toArray(); // [ [ 1, 6 ] ]\n```\n\n### Iterable output\nTo get ranges as an [iterable][iterable-doc-link], use `.toIterable()` method provided.\n\nExample:\n```typescript\nconst range: Rangr = new Rangr([ [1,3], [2,6] ]);\nconst rangeIterator = range.toIterable();\n\nrangeIterator.next(); // { value: [ 1, 6 ], done: false }\nrangeIterator.next(); // { value: undefined, done: true }\n```\n\n### Support for ESM and CommonJS\n\nrangr supports both ECMAScript Modules and CommonJS using [Conditional Exports][conditional-exports-doc-link] provided by Node.js.\n\n#### CommonJS\n```javascript\nconst Rangr = require('rangr');\n```\n\n#### ESM\n```javascript\nimport Rangr from 'rangr';\n```\n\n## Contributions\nThe package is not very performant in managing th ranges and lacks a rich API. Contributions in the form of issues and PRs are welcome! 🙌🏽\n\n## Install\n```bash\nnpm i rangr\n```\n\n## Test\n```bash\nnpm test\n```\n\n## License\n[MIT License](https://choosealicense.com/licenses/mit/)\n\n\n\n[logo-image]: https://res.cloudinary.com/tbking/image/upload/c_scale,w_600/v1593635483/rangr/logo.png\n[build-image]:https://img.shields.io/github/workflow/status/tarunbatra/rangr/CI?label=CI\u0026logo=github\u0026style=flat-square\n[build-url]:https://github.com/tarunbatra/rangr/actions?query=workflow%3ACI\n[codecov-url]: https://codecov.io/gh/tarunbatra/rangr\n[codecov-image]: https://img.shields.io/codecov/c/gh/tarunbatra/rangr?logo=codecov\u0026style=flat-square\n[npm-image]: https://img.shields.io/npm/v/rangr.svg?style=flat-square\u0026color=magenta\n[npm-url]: https://www.npmjs.com/package/rangr\n[lang-image]: https://img.shields.io/github/languages/top/tarunbatra/rangr?style=flat-square\n\n[leetcode-problem-url]: https://leetcode.com/problems/merge-intervals/\n[iterable-doc-link]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol\n[conditional-exports-doc-link]: https://nodejs.org/api/esm.html#esm_conditional_exports","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarunbatra%2Frangr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftarunbatra%2Frangr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarunbatra%2Frangr/lists"}