{"id":13718251,"url":"https://github.com/canscale/StableHeapBTreeMap","last_synced_at":"2025-05-07T08:30:54.199Z","repository":{"id":88480610,"uuid":"559092899","full_name":"canscale/StableHeapBTreeMap","owner":"canscale","description":"A functional BTreeMap that can be used with a stable variable in heap memory","archived":false,"fork":false,"pushed_at":"2024-01-01T01:15:17.000Z","size":141,"stargazers_count":5,"open_issues_count":1,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-11-14T06:34:47.010Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Motoko","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/canscale.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}},"created_at":"2022-10-29T03:19:42.000Z","updated_at":"2023-06-17T12:27:25.000Z","dependencies_parsed_at":"2023-03-09T12:45:19.631Z","dependency_job_id":"397372f7-9be5-4a8b-adca-ad5d7df02bda","html_url":"https://github.com/canscale/StableHeapBTreeMap","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":"ByronBecker/motoko-library-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canscale%2FStableHeapBTreeMap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canscale%2FStableHeapBTreeMap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canscale%2FStableHeapBTreeMap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canscale%2FStableHeapBTreeMap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/canscale","download_url":"https://codeload.github.com/canscale/StableHeapBTreeMap/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252842395,"owners_count":21812661,"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":[],"created_at":"2024-08-03T00:08:23.143Z","updated_at":"2025-05-07T08:30:53.368Z","avatar_url":"https://github.com/canscale.png","language":"Motoko","funding_links":[],"categories":["Libraries"],"sub_categories":["Data structures"],"readme":"# StableHeapBTreeMap\n\nA functional, heap-based [BTree](https://en.wikipedia.org/wiki/B-tree) data structure written in Motoko\n\n## API Documentation\n\nFull API documentation for this library can be found at https://canscale.github.io/StableHeapBTreeMap/BTree.html\n\n\n## Usage\nInstall vessel and ensure this is included in your package-set.dhall and vessel.dhall\n```\nimport BTree \"mo:btree/BTree\";\n...\n// initialize\nlet t = BTree.init\u003cText, Nat\u003e(?32); // 32 is the order, or the size of each BTree node\n\n// initialize from an array or buffer (similar methods for toArray/toBuffer)\nlet t = BTree.fromArray\u003cText, Nat\u003e(32, Text.compare, array);\nlet t = BTree.fromBuffer\u003cText, Nat\u003e(32, Text.compare, buffer);\n\n// insert (write)\nlet originalValue = BTree.insert\u003cText, Nat\u003e(t, Text.compare, \"John\", 52);\n\n// paginate through a collection in ascending order grab first 10 and the next key\nlet { results; nextKey } = BTree.scanLimit\u003cText, Nat\u003e(t, Text.compare, \"A\", \"Z\", #fwd, 10);\n\n// get min element\nlet minElement = BTree.min\u003cText, Nat\u003e(t);\n```\n... and much more, head to the [docs](https://canscale.github.io/StableHeapBTreeMap/BTree.html) to see the full API.\n\n## License\n\nStableHeapBTreeMap is distributed under the terms of the Apache License (Version 2.0).\n\nSee LICENSE for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcanscale%2FStableHeapBTreeMap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcanscale%2FStableHeapBTreeMap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcanscale%2FStableHeapBTreeMap/lists"}