{"id":17351237,"url":"https://github.com/youngwind/array-to-hash-object","last_synced_at":"2026-07-13T06:32:42.414Z","repository":{"id":57184151,"uuid":"55760781","full_name":"youngwind/array-to-hash-object","owner":"youngwind","description":"将数组转换成对象（可自定义hash key）","archived":false,"fork":false,"pushed_at":"2016-04-19T00:52:59.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-20T06:34:19.892Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/youngwind.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-08T07:52:15.000Z","updated_at":"2020-08-12T02:52:34.000Z","dependencies_parsed_at":"2022-08-23T01:20:53.402Z","dependency_job_id":null,"html_url":"https://github.com/youngwind/array-to-hash-object","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/youngwind/array-to-hash-object","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/youngwind%2Farray-to-hash-object","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/youngwind%2Farray-to-hash-object/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/youngwind%2Farray-to-hash-object/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/youngwind%2Farray-to-hash-object/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/youngwind","download_url":"https://codeload.github.com/youngwind/array-to-hash-object/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/youngwind%2Farray-to-hash-object/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35413538,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-13T02:00:06.543Z","response_time":119,"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-10-15T17:09:22.784Z","updated_at":"2026-07-13T06:32:42.397Z","avatar_url":"https://github.com/youngwind.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# What this package do？\nTransform array to object with a custom hash key.\nFor example.\n\n```\nvar before = [\n{\n  id:1,\n  name:\"youngwind',\n  age:24\n},\n{\n id:2,\n name:\"xiaoye\",\n age:30\n}\n];\n\n```\n\n```\n// after\n{\n  1:{\n    name:\"youngwind\",\n    age:24\n  },\n  2:{\n    name:\"xiaoye\",\n    age:30\n  }\n}\n```\n\n# Install\n```\nnpm install array-to-hash-object --save\n```\n\n# Usage\n```\nvar arrayToHash = require('array-to-hash-object');\nvar after = arrayToHash(before,'id');\nconsole.log(after);\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoungwind%2Farray-to-hash-object","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyoungwind%2Farray-to-hash-object","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoungwind%2Farray-to-hash-object/lists"}