{"id":22108987,"url":"https://github.com/uzmoi/bimap","last_synced_at":"2025-09-03T04:40:12.926Z","repository":{"id":115908100,"uuid":"438994366","full_name":"uzmoi/bimap","owner":"uzmoi","description":"A simple and tiny bi-directional map that extends ES2015's Map.","archived":false,"fork":false,"pushed_at":"2022-07-19T08:31:45.000Z","size":350,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-01T13:34:39.224Z","etag":null,"topics":["bimap"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@rizzzse/bimap","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/uzmoi.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}},"created_at":"2021-12-16T13:12:36.000Z","updated_at":"2021-12-31T08:23:10.000Z","dependencies_parsed_at":"2023-05-09T15:23:46.405Z","dependency_job_id":null,"html_url":"https://github.com/uzmoi/bimap","commit_stats":null,"previous_names":["uzmoi/bimap","rizzzse/bimap"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/uzmoi/bimap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uzmoi%2Fbimap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uzmoi%2Fbimap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uzmoi%2Fbimap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uzmoi%2Fbimap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uzmoi","download_url":"https://codeload.github.com/uzmoi/bimap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uzmoi%2Fbimap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273392280,"owners_count":25097257,"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-09-03T02:00:09.631Z","response_time":76,"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":["bimap"],"created_at":"2024-12-01T09:27:43.643Z","updated_at":"2025-09-03T04:40:12.869Z","avatar_url":"https://github.com/uzmoi.png","language":"TypeScript","readme":"# bimap\n\nA simple and tiny bi-directional map that extends ES2015's Map.\nBiMap can be operated with the same interface as Map, and you can get an inverted BiMap with `inverse`.\n\n```ts\n// cjs\nconst { BiMap, WeakBiMap } = require(\"@rizzzse/bimap\");\n// esm\nimport { BiMap, WeakBiMap } from \"@rizzzse/bimap\";\n\nconst bimap = new BiMap([[\"key\", \"value\"]]);\nbimap.get(\"key\");           // === \"value\"\nbimap.inverse.get(\"value\"); // === \"key\"\n\nbimap.set(\"key2\", \"value\");\nbimap.has(\"key\");           // === false\nbimap.get(\"key2\");          // === \"value\"\nbimap.inverse.get(\"value\"); // === \"key2\"\n```\n\n```ts\nclass MyBiMap\u003cK, V\u003e extends BiMap\u003cK, V\u003e {\n    declare readonly inverse: MyBiMap\u003cV, K\u003e;\n    myMethod() {\n        // ...\n    }\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuzmoi%2Fbimap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuzmoi%2Fbimap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuzmoi%2Fbimap/lists"}