{"id":23488450,"url":"https://github.com/onesy-me/heap","last_synced_at":"2026-05-05T22:43:04.809Z","repository":{"id":41100952,"uuid":"458895704","full_name":"onesy-me/heap","owner":"onesy-me","description":"Min/Max Heap","archived":false,"fork":false,"pushed_at":"2024-12-11T23:28:03.000Z","size":65,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-07T22:35:49.455Z","etag":null,"topics":["algorithm","amaui","back-end","backend","binary-search-tree","binary-tree","browser","front-end","frontend","heap","javascript","js","max-heap","min-heap","node","nodejs","priority-queue","typescript","utils","web"],"latest_commit_sha":null,"homepage":"https://docs.onesy.me/library/heap","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/onesy-me.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-13T18:28:38.000Z","updated_at":"2024-12-11T23:28:07.000Z","dependencies_parsed_at":"2024-12-24T23:11:37.360Z","dependency_job_id":"dade5ca5-4bdd-4c31-930c-2d8e41baca23","html_url":"https://github.com/onesy-me/heap","commit_stats":{"total_commits":13,"total_committers":1,"mean_commits":13.0,"dds":0.0,"last_synced_commit":"941958d6ecdda097c0a3a3d1797fc5a55229733f"},"previous_names":["onesy-me/amaui-heap","amaui-org/amaui-heap"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onesy-me%2Fheap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onesy-me%2Fheap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onesy-me%2Fheap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onesy-me%2Fheap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onesy-me","download_url":"https://codeload.github.com/onesy-me/heap/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248510002,"owners_count":21116131,"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":["algorithm","amaui","back-end","backend","binary-search-tree","binary-tree","browser","front-end","frontend","heap","javascript","js","max-heap","min-heap","node","nodejs","priority-queue","typescript","utils","web"],"created_at":"2024-12-24T23:11:31.600Z","updated_at":"2026-05-05T22:43:04.804Z","avatar_url":"https://github.com/onesy-me.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003c/br\u003e\n\u003c/br\u003e\n\n\u003cp align='center'\u003e\n  \u003ca target='_blank' rel='noopener noreferrer' href='#'\u003e\n    \u003cimg width='auto' height='84' src='https://raw.githubusercontent.com/onesy-me/onesy/refs/heads/main/utils/images/logo.png' alt='onesy logo' /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch1 align='center'\u003eonesy Min/Max Heap\u003c/h1\u003e\n\n\u003ch3 align='center'\u003e\n  \u003csub\u003eMIT license\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u003c/sub\u003e\n  \u003csub\u003eProduction ready\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u003c/sub\u003e\n  \u003csub\u003eUMD 2kb gzipped\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u003c/sub\u003e\n  \u003csub\u003e100% test cov\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u003c/sub\u003e\n  \u003csub\u003eBrowser and Nodejs\u003c/sub\u003e\n\u003c/h3\u003e\n\n\u003cp align='center'\u003e\n  \u003csub\u003eVery simple code\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u003c/sub\u003e\n  \u003csub\u003eModern code\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u003c/sub\u003e\n  \u003csub\u003eJunior friendly\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u003c/sub\u003e\n  \u003csub\u003eTypescript\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u003c/sub\u003e\n  \u003csub\u003eMade with :yellow_heart:\u003c/sub\u003e\n\u003c/p\u003e\n\n\u003cbr /\u003e\n\n### Add\n\n```sh\nyarn add @onesy/heap\n```\n\n### Use cases\n- Priority queues\n- Schedulers\n- etc.\n\n### Use\n\n```javascript\n  import { OnesyHeap } from '@onesy/heap';\n\n  // Make a new heap instance\n  // with an optional initial value a variant (min or max)\n  // a min heap as a default value\n  const onesyMinHeap = new OnesyHeap();\n\n  // Add a onesy node / value\n  onesyMinHeap.add(4);\n\n  // You can also make a heap from array of values\n  onesyMinHeap.make([4, 44, 54, 14, 31, 37, 24]);\n\n  // values\n         4\n        /  \\\n       /    \\\n     14      24\n     / \\     / \\\n   44   31 37   54\n\n  // Remove priority min (first) value\n  onesyMinHeap.remove();\n\n  // 4\n\n  // values\n         14\n        /  \\\n       /    \\\n     31      24\n     / \\     /\n   44   54 37\n```\n\n### Dev\n\nInstall\n\n```sh\nyarn\n```\n\nTest\n\n```sh\nyarn test\n```\n\n### Prod\n\nBuild\n\n```sh\nyarn build\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonesy-me%2Fheap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonesy-me%2Fheap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonesy-me%2Fheap/lists"}