{"id":22195377,"url":"https://github.com/tabcat/sorted-sets","last_synced_at":"2025-07-01T15:13:11.204Z","repository":{"id":234345862,"uuid":"786126848","full_name":"tabcat/sorted-sets","owner":"tabcat","description":"Utilities for working with ordered sets","archived":false,"fork":false,"pushed_at":"2024-12-02T02:09:36.000Z","size":278,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-02T02:25:22.803Z","etag":null,"topics":[],"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/tabcat.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}},"created_at":"2024-04-13T14:12:36.000Z","updated_at":"2024-12-02T02:09:40.000Z","dependencies_parsed_at":"2024-04-24T00:27:38.213Z","dependency_job_id":"b69d7214-71bd-42ef-94be-f843c22d9a75","html_url":"https://github.com/tabcat/sorted-sets","commit_stats":null,"previous_names":["tabcat/ordered-sets","tabcat/sorted-sets"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tabcat%2Fsorted-sets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tabcat%2Fsorted-sets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tabcat%2Fsorted-sets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tabcat%2Fsorted-sets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tabcat","download_url":"https://codeload.github.com/tabcat/sorted-sets/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245359248,"owners_count":20602322,"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-12-02T13:20:04.118Z","updated_at":"2025-03-24T21:41:08.720Z","avatar_url":"https://github.com/tabcat.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sorted-sets\n\nUtilities for working with sorted sets.\n\n- Zero Dependencies\n- Uses ES6 Iterables\n\nCore of library is the `pairwiseTraversal` generator in [src/util.ts](https://github.com/tabcat/sorted-sets/blob/master/src/util.ts).\n\n## API Docs\n\nhttps://tabcat.github.io/sorted-sets/\n\n## Install\n\nAvailable from NPM at name: `@tabcat/sorted-sets`\n\n## Build\n\nIn this package we use [PNPM](https://pnpm.io/)\n\n```\npnpm install\npnpm build\n```\n\n## Performance\n\nThis library provides efficient operations for sorted sets.\n\nMay be useful in the following cases:\n\n- Set elements must remain in order.\n- Set elements are expensive to store as primitives.\n\nIf none of these apply, it's probably better to implement the needed operations using Javascript's Set class.\n\n### Benchmarks\n\nThere's a very simple benchmark comparing the set operations difference, symmetric difference, union and intersection implemented in this library versus an implementation using Set.\n\n```\npnpm install\npnpm benchmark\n```\n\nOutput should look something like this:\n\n```\ndifference      impl: Set               size: 1000 x 43,716 ops/sec ±0.72% (92 runs sampled)\ndifference      impl: sorted-sets      size: 1000 x 22,283 ops/sec ±0.16% (97 runs sampled)\nsymmetric       impl: Set               size: 1000 x 74,039 ops/sec ±0.17% (96 runs sampled)\nsymmetric       impl: sorted-sets      size: 1000 x 22,269 ops/sec ±0.21% (98 runs sampled)\nunion           impl: Set               size: 1000 x 49,286 ops/sec ±0.21% (97 runs sampled)\nunion           impl: sorted-sets      size: 1000 x 22,304 ops/sec ±0.12% (100 runs sampled)\nintersection    impl: Set               size: 1000 x 44,572 ops/sec ±1.70% (89 runs sampled)\nintersection    impl: sorted-sets      size: 1000 x 7,387,917 ops/sec ±0.19% (99 runs sampled)\n```\n\n## Extension\n\nIf you have a usecase for a missing feature be sure to make an issue.\nHave been thinking about building a merge function.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftabcat%2Fsorted-sets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftabcat%2Fsorted-sets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftabcat%2Fsorted-sets/lists"}