{"id":22913958,"url":"https://github.com/bentatum/hash-to-collection","last_synced_at":"2025-04-01T11:50:08.144Z","repository":{"id":57261596,"uuid":"101130386","full_name":"bentatum/hash-to-collection","owner":"bentatum","description":"easily convert a hash to a collection","archived":false,"fork":false,"pushed_at":"2017-10-18T19:20:38.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-29T05:42:49.162Z","etag":null,"topics":["conversion","hash","hash-map","list","object"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bentatum.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-23T02:49:30.000Z","updated_at":"2017-08-23T22:22:01.000Z","dependencies_parsed_at":"2022-08-25T06:01:58.578Z","dependency_job_id":null,"html_url":"https://github.com/bentatum/hash-to-collection","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/bentatum%2Fhash-to-collection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bentatum%2Fhash-to-collection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bentatum%2Fhash-to-collection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bentatum%2Fhash-to-collection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bentatum","download_url":"https://codeload.github.com/bentatum/hash-to-collection/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246635930,"owners_count":20809330,"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":["conversion","hash","hash-map","list","object"],"created_at":"2024-12-14T05:12:38.869Z","updated_at":"2025-04-01T11:50:08.089Z","avatar_url":"https://github.com/bentatum.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hash-to-collection\n\n[![npm][npm-image]][npm-url]\n[![travis][travis-image]][travis-url]\n[![standard][standard-image]][standard-url]\n\n[npm-image]: https://img.shields.io/npm/v/hash-to-collection.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/hash-to-collection\n[travis-image]: https://img.shields.io/travis/bentatum/hash-to-collection.svg?style=flat-square\n[travis-url]: https://travis-ci.org/bentatum/hash-to-collection\n[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\n[standard-url]: http://npm.im/standard\n\nconvert a hash to a collection\n\n## Install\n\n```\nyarn add hash-to-collection\n```\n\n## API\n```js\nhashToCollection(hash, [keyName])\n```\n\n### Arguments\ncollection (Array): the collection to convert\nkeyName (string): the key name your hash keys will be stored as (default: 'key')\n\n## Usage\n\n```js\nimport hashToCollection from 'hash-to-collection'\n\nconst hash = {\n  123: { ... },\n  abc: { ... }\n}\nconst collection = hashToCollection(collection, 'uid')\n\n/*\n  [{ uid: 123, ... }, { uid: 'abc', ... }]\n*/\n```\n\n## Contributing\n\nContributions welcome! Please read the [contributing guidelines](CONTRIBUTING.md) first.\n\n## License\n\n[ISC](LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbentatum%2Fhash-to-collection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbentatum%2Fhash-to-collection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbentatum%2Fhash-to-collection/lists"}