{"id":29308877,"url":"https://github.com/andrewnester/ts-heapq","last_synced_at":"2026-02-28T04:06:39.856Z","repository":{"id":32585447,"uuid":"137576184","full_name":"andrewnester/ts-heapq","owner":"andrewnester","description":"Heap queue algorithm implementation for Typescript based on heapq.py module from CPython","archived":false,"fork":false,"pushed_at":"2025-02-19T17:40:15.000Z","size":84,"stargazers_count":2,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-07T07:18:53.504Z","etag":null,"topics":["heap","heap-queue","heapq","heapsort","priority-queue","python","ts","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andrewnester.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2018-06-16T11:38:13.000Z","updated_at":"2025-06-13T13:57:24.000Z","dependencies_parsed_at":"2025-07-07T07:29:02.813Z","dependency_job_id":null,"html_url":"https://github.com/andrewnester/ts-heapq","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/andrewnester/ts-heapq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewnester%2Fts-heapq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewnester%2Fts-heapq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewnester%2Fts-heapq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewnester%2Fts-heapq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrewnester","download_url":"https://codeload.github.com/andrewnester/ts-heapq/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewnester%2Fts-heapq/sbom","scorecard":{"id":193882,"data":{"date":"2025-08-11","repo":{"name":"github.com/andrewnester/ts-heapq","commit":"c27faacc1de009272ca874c4f15f4407b7d9c335"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Code-Review","score":1,"reason":"Found 2/19 approved changesets -- score normalized to 1","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":"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":"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":"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":"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/andrewnester/ts-heapq/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/andrewnester/ts-heapq/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/andrewnester/ts-heapq/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/andrewnester/ts-heapq/publish.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/andrewnester/ts-heapq/publish.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/build.yml:20","Warn: npmCommand not pinned by hash: .github/workflows/publish.yml:16","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   2 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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.yml:1","Warn: no topLevel permission defined: .github/workflows/publish.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":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 17 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":3,"reason":"7 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"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-16T21:24:06.840Z","repository_id":32585447,"created_at":"2025-08-16T21:24:06.841Z","updated_at":"2025-08-16T21:24:06.841Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29924719,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T19:37:42.220Z","status":"online","status_checked_at":"2026-02-28T02:00:07.010Z","response_time":90,"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":["heap","heap-queue","heapq","heapsort","priority-queue","python","ts","typescript"],"created_at":"2025-07-07T07:18:36.690Z","updated_at":"2026-02-28T04:06:39.840Z","avatar_url":"https://github.com/andrewnester.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Heapq for Typescript\n\n[![TypeScript](https://badges.frapsoft.com/typescript/code/typescript.svg?v=101)](https://github.com/ellerbrock/typescript-badges/)\n[![Build](https://github.com/andrewnester/ts-heapq/actions/workflows/build.yml/badge.svg)](https://github.com/andrewnester/ts-heapq/actions/workflows/build.yml)\n[![Maintainability](https://api.codeclimate.com/v1/badges/b90d3149712e35d098e8/maintainability)](https://codeclimate.com/github/andrewnester/ts-heapq/maintainability)\n[![npm version](https://badge.fury.io/js/ts-heapq.svg)](https://badge.fury.io/js/ts-heapq)\n\n\n[![NPM](https://nodei.co/npm/ts-heapq.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://nodei.co/npm/ts-heapq/)\n\nHeap queue algorithm implementation for Typescript based on heapq.py module from CPython\n\n### Installation\n\n    npm install ts-heapq\n    \n### Use\nTest\n#### Simple example\n    \n    import { Heapq } from \"ts-heapq\";\n    \n    let heap: Heapq\u003cnumber\u003e = new Heapq\u003cnumber\u003e();\n    heap.push(3);\n    heap.push(1);\n    heap.push(2);\n    \n    heap.top(); // return 1;\n    heap.pop(); // return 1, heap contains [2, 3];\n    heap.top(); // returns 2;\n    \n#### Implementing max heap using custom comparator\n    \n    import { Heapq } from \"ts-heapq\";\n    \n    let maxHeap: Heapq\u003cnumber\u003e = new Heapq\u003cnumber\u003e([], comparator: (a: number, b: number) =\u003e a \u003e b);\n    maxHeap.push(1);\n    maxHeap.push(3);\n    maxHeap.push(2);\n    \n    maxHeap.top(); // return 3;\n    maxHeap.pop(); // return 3, heap contains [2, 1];\n    maxHeap.top(); // returns 2;\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewnester%2Fts-heapq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewnester%2Fts-heapq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewnester%2Fts-heapq/lists"}