{"id":22311544,"url":"https://github.com/vilicvane/multikey-map","last_synced_at":"2025-07-29T08:32:17.117Z","repository":{"id":57305216,"uuid":"100934784","full_name":"vilicvane/multikey-map","owner":"vilicvane","description":null,"archived":false,"fork":false,"pushed_at":"2024-02-18T10:30:03.000Z","size":267,"stargazers_count":2,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-25T03:07:41.854Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vilicvane.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":"2017-08-21T09:15:01.000Z","updated_at":"2024-01-25T14:30:49.000Z","dependencies_parsed_at":"2022-09-20T21:10:57.177Z","dependency_job_id":"d011d022-013e-4ab6-a9d8-0507be839ed3","html_url":"https://github.com/vilicvane/multikey-map","commit_stats":null,"previous_names":["vilicvane/multikey-map","vilic/multikey-map"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/vilicvane/multikey-map","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vilicvane%2Fmultikey-map","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vilicvane%2Fmultikey-map/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vilicvane%2Fmultikey-map/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vilicvane%2Fmultikey-map/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vilicvane","download_url":"https://codeload.github.com/vilicvane/multikey-map/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vilicvane%2Fmultikey-map/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267653234,"owners_count":24122164,"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-29T02:00:12.549Z","response_time":2574,"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":[],"created_at":"2024-12-03T21:20:16.180Z","updated_at":"2025-07-29T08:32:16.848Z","avatar_url":"https://github.com/vilicvane.png","language":"TypeScript","readme":"[![NPM version](https://img.shields.io/npm/v/multikey-map?color=%23cb3837\u0026style=flat-square)](https://www.npmjs.com/package/multikey-map)\n[![Repository package.json version](https://img.shields.io/github/package-json/v/vilicvane/multikey-map?color=%230969da\u0026label=repo\u0026style=flat-square)](./package.json)\n[![MIT License](https://img.shields.io/badge/license-MIT-999999?style=flat-square)](./LICENSE)\n[![Discord](https://img.shields.io/badge/chat-discord-5662f6?style=flat-square)](https://discord.gg/wEVn2qcf8h)\n\n# Multikey Map\n\nA simple map implementation that supports multiple keys.\n\n\u003e `multikey-map` uses `mixed-map` internally, which is a map implementation that uses both `Map` and `WeakMap` internally.\n\n## Installation\n\n```sh\nnpm install multikey-map\n```\n\n## Usage\n\n```ts\nimport MultikeyMap from 'multikey-map';\n\nlet map = new MultikeyMap\u003c[string, number], string | undefined\u003e();\n\nmap.set(['foo', 0], 'a');\nmap.set(['foo', 1], 'b');\n\nmap.get(['foo', 0]); // 'a'\nmap.get(['foo', 1]); // 'b'\nmap.get(['foo', 2]); // undefined\nmap.has(['foo', 2]); // false\nmap.hasAndGet(['foo', 2]); // [false, undefined]\n\nmap.set(['bar', 0], undefined);\n\nmap.get(['bar', 0]); // undefined\nmap.has(['bar', 0]); // true\nmap.hasAndGet(['bar', 0]); // [true, undefined]\n```\n\n## License\n\nMIT License.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvilicvane%2Fmultikey-map","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvilicvane%2Fmultikey-map","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvilicvane%2Fmultikey-map/lists"}