{"id":16126814,"url":"https://github.com/mikolalysenko/invert-hash","last_synced_at":"2025-09-03T03:32:13.810Z","repository":{"id":8065810,"uuid":"9477992","full_name":"mikolalysenko/invert-hash","owner":"mikolalysenko","description":"Inverts an object hash","archived":false,"fork":false,"pushed_at":"2013-05-14T00:12:24.000Z","size":108,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-28T10:01:42.939Z","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/mikolalysenko.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":"2013-04-16T17:13:33.000Z","updated_at":"2015-03-19T02:42:20.000Z","dependencies_parsed_at":"2022-08-31T21:21:05.312Z","dependency_job_id":null,"html_url":"https://github.com/mikolalysenko/invert-hash","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikolalysenko%2Finvert-hash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikolalysenko%2Finvert-hash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikolalysenko%2Finvert-hash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikolalysenko%2Finvert-hash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikolalysenko","download_url":"https://codeload.github.com/mikolalysenko/invert-hash/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243933378,"owners_count":20370989,"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-10-09T21:40:31.057Z","updated_at":"2025-03-18T13:31:48.458Z","avatar_url":"https://github.com/mikolalysenko.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"invert-hash\n===========\nComputes the inverse of a hash, assuming that it is bijective.\n\n# Example\n\n```javascript\n\nvar invert = require(\"invert-hash\")\n\nconsole.log(invert({\n  'a': 1,\n  'b': 2,\n  'c': 3\n}))\n\n//Prints out:\n//\n//  {\n//    1: 'a',\n//    2: 'b',\n//    3: 'c'\n//  }\n//\n```\n\n# Install\n\n    npm install invert-hash\n\n### `require(\"invert-hash\")(obj)`\nComputes the inverse of a hash\n\n* `obj` is a hash object\n\n**Returns** An object whose keys are the values of `obj` and whose values are the `keys` of object.\n\n# Credits\n(c) 2013 Mikola Lysenko. MIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikolalysenko%2Finvert-hash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikolalysenko%2Finvert-hash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikolalysenko%2Finvert-hash/lists"}