{"id":20114402,"url":"https://github.com/leecjson/semver-map","last_synced_at":"2025-08-18T11:06:36.311Z","repository":{"id":57356596,"uuid":"158643870","full_name":"leecjson/semver-map","owner":"leecjson","description":"Use javascript's map with Semantic-Versioning","archived":false,"fork":false,"pushed_at":"2018-11-22T05:24:54.000Z","size":45,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-04T00:24:14.544Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/leecjson.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}},"created_at":"2018-11-22T04:51:13.000Z","updated_at":"2019-06-23T16:38:37.000Z","dependencies_parsed_at":"2022-09-05T07:00:30.334Z","dependency_job_id":null,"html_url":"https://github.com/leecjson/semver-map","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/leecjson/semver-map","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leecjson%2Fsemver-map","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leecjson%2Fsemver-map/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leecjson%2Fsemver-map/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leecjson%2Fsemver-map/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leecjson","download_url":"https://codeload.github.com/leecjson/semver-map/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leecjson%2Fsemver-map/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270982194,"owners_count":24679447,"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-08-18T02:00:08.743Z","response_time":89,"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-11-13T18:29:37.826Z","updated_at":"2025-08-18T11:06:36.283Z","avatar_url":"https://github.com/leecjson.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# semver-map\nUse javascript's map with Semantic-Versioning\n\n# Usage\n```shell\nnpm install --save semver-map\n```\n\n```javascript\nconst SemverMap = require('semver-map');\n\ntest('usage test', () =\u003e {\n  const map = new SemverMap();\n  map.add('myname@1.0.0', 'star lord');\n  expect(map.get('myname@1.0.0')).toBe('star lord');\n\n  map.add('myname@1.0.1', 'haha');\n  expect(map.get('myname@1.0.1')).toBe('haha');\n\n  map.add('myname@1.0.2', 'hehe');\n  expect(map.get('myname@^1.0.1')).toBe('hehe');\n  expect(map.get('myname@^1.0.1@max')).toBe('hehe');\n  expect(map.get('myname@^1.0.1@min')).toBe('haha');\n\n  map.add('myname@1.4.5', 'pppp');\n  expect(map.get('myname@1.x')).toBe('pppp');\n  expect(map.get('myname@1.x@max')).toBe('pppp');\n  expect(map.get('myname@1.x@min')).toBe('star lord');\n\n  map.add('myname@1.4.6', 'kkkk');\n  expect(map.get('myname@1.4.6@max')).toBe('kkkk');\n  expect(map.get('myname@1.4.6@min')).toBe('kkkk');\n\n  map.add('myname@1.4.7', null);\n  map.add('myname@1.4.8', undefined);\n  map.add('myname@1.4.9', 0);\n  expect(map.get('myname@1.4.7')).toBe(null);\n  expect(map.get('myname@1.4.7')).toBe(null);\n  expect(map.get('myname@1.4.8')).toBe(undefined);\n  expect(map.get('myname@1.4.8')).toBe(undefined);\n  expect(map.get('myname@1.4.x')).toBe(0);\n  expect(map.get('myname@1.4.x')).toBe(0);\n\n  map.add('webpack@7.4.3', [1, 2, 3]);\n  expect(map.get('webpack@^7.4.1')).toEqual([1, 2, 3]);\n  map.add('loadash@4.2.3-rc.1', 555);\n  expect(map.get('loadash@4.2.3-rc.1')).toBe(555);\n});\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleecjson%2Fsemver-map","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleecjson%2Fsemver-map","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleecjson%2Fsemver-map/lists"}