{"id":16351598,"url":"https://github.com/tomeraberbach/keyalesce","last_synced_at":"2025-07-22T03:05:36.480Z","repository":{"id":178156437,"uuid":"661418297","full_name":"TomerAberbach/keyalesce","owner":"TomerAberbach","description":"🔑 Get the same key for the same sequence of values!","archived":false,"fork":false,"pushed_at":"2024-11-17T22:15:03.000Z","size":602,"stargazers_count":13,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-19T06:51:50.269Z","etag":null,"topics":["finalizationregistry","hashing","idempotent","key-value","map","set","weakmap","weakref"],"latest_commit_sha":null,"homepage":"https://npm.im/keyalesce","language":"TypeScript","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/TomerAberbach.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":"contributing.md","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":"2023-07-02T19:26:36.000Z","updated_at":"2025-05-14T16:54:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"dfa1dc4c-9a15-4c5a-be7a-f5fa58478d76","html_url":"https://github.com/TomerAberbach/keyalesce","commit_stats":null,"previous_names":["tomeraberbach/keyalesce"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/TomerAberbach/keyalesce","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomerAberbach%2Fkeyalesce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomerAberbach%2Fkeyalesce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomerAberbach%2Fkeyalesce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomerAberbach%2Fkeyalesce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TomerAberbach","download_url":"https://codeload.github.com/TomerAberbach/keyalesce/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomerAberbach%2Fkeyalesce/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266417093,"owners_count":23925301,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["finalizationregistry","hashing","idempotent","key-value","map","set","weakmap","weakref"],"created_at":"2024-10-11T01:23:20.422Z","updated_at":"2025-07-22T03:05:36.452Z","avatar_url":"https://github.com/TomerAberbach.png","language":"TypeScript","funding_links":["https://github.com/sponsors/TomerAberbach"],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  keyalesce\n\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://npmjs.org/package/keyalesce\"\u003e\n    \u003cimg src=\"https://badgen.now.sh/npm/v/keyalesce\" alt=\"version\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/TomerAberbach/keyalesce/actions\"\u003e\n    \u003cimg src=\"https://github.com/TomerAberbach/keyalesce/workflows/CI/badge.svg\" alt=\"CI\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://unpkg.com/keyalesce/dist/index.min.js\"\u003e\n    \u003cimg src=\"https://deno.bundlejs.com/?q=keyalesce\u0026badge\" alt=\"gzip size\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://unpkg.com/keyalesce/dist/index.min.js\"\u003e\n    \u003cimg src=\"https://deno.bundlejs.com/?q=keyalesce\u0026config={%22compression%22:{%22type%22:%22brotli%22}}\u0026badge\" alt=\"brotli size\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/sponsors/TomerAberbach\"\u003e\n    \u003cimg src=\"https://img.shields.io/static/v1?label=Sponsor\u0026message=%E2%9D%A4\u0026logo=GitHub\u0026color=%23fe8e86\" alt=\"Sponsor\"\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  Get the same key for the same sequence of values!\n\u003c/div\u003e\n\n## Features\n\n- **Simple:** a single function that takes an array and returns a key\n- **Tiny:** 580 bytes gzipped!\n- **Performant:** maintains a regularly pruned internal\n  [trie](https://en.wikipedia.org/wiki/Trie) of the value sequences\n\n## When would I use this and how does it work?\n\n[Read my post!](https://tomeraberba.ch/the-making-of-keyalesce)\n\n## Install\n\n```sh\n$ npm i keyalesce\n```\n\n## Usage\n\n```js\nimport keyalesce from 'keyalesce'\n\nconst hangouts = new Set()\n\nconst createHangoutKey = (person1, person2) =\u003e\n  keyalesce([person1, person2].sort())\nconst hangOut = (person1, person2) =\u003e\n  hangouts.add(createHangoutKey(person1, person2))\nconst didTheyHangOut = (person1, person2) =\u003e\n  hangouts.has(createHangoutKey(person1, person2))\n\nhangOut(`Tomer`, `Samuel`)\nhangOut(`Tomer`, `Amanda`)\n\nconsole.log(didTheyHangOut(`Tomer`, `Samuel`))\nconsole.log(didTheyHangOut(`Samuel`, `Tomer`))\n//=\u003e true\n//=\u003e true\n\nconsole.log(didTheyHangOut(`Tomer`, `Amanda`))\nconsole.log(didTheyHangOut(`Amanda`, `Tomer`))\n//=\u003e true\n//=\u003e true\n\nconsole.log(didTheyHangOut(`Samuel`, `Amanda`))\nconsole.log(didTheyHangOut(`Amanda`, `Samuel`))\n//=\u003e false\n//=\u003e false\n```\n\n## Contributing\n\nStars are always welcome!\n\nFor bugs and feature requests,\n[please create an issue](https://github.com/TomerAberbach/keyalesce/issues/new).\n\n## License\n\n[MIT](https://github.com/TomerAberbach/keyalesce/blob/main/license) ©\n[Tomer Aberbach](https://github.com/TomerAberbach) \\\n[Apache 2.0](https://github.com/TomerAberbach/keyalesce/blob/main/license-apache) ©\n[Google](https://github.com/TomerAberbach/keyalesce/blob/main/notice-apache)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomeraberbach%2Fkeyalesce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomeraberbach%2Fkeyalesce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomeraberbach%2Fkeyalesce/lists"}