{"id":22913956,"url":"https://github.com/bentatum/collection-to-hash","last_synced_at":"2025-04-01T11:50:06.373Z","repository":{"id":57203173,"uuid":"101130347","full_name":"bentatum/collection-to-hash","owner":"bentatum","description":"convert a collection to a hash object.","archived":false,"fork":false,"pushed_at":"2018-02-08T20:10:34.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-09T22:35:36.677Z","etag":null,"topics":["collection","conversion","hash","hash-map","hashmap"],"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:04.000Z","updated_at":"2017-08-24T11:40:51.000Z","dependencies_parsed_at":"2022-09-16T15:21:52.407Z","dependency_job_id":null,"html_url":"https://github.com/bentatum/collection-to-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/bentatum%2Fcollection-to-hash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bentatum%2Fcollection-to-hash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bentatum%2Fcollection-to-hash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bentatum%2Fcollection-to-hash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bentatum","download_url":"https://codeload.github.com/bentatum/collection-to-hash/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":["collection","conversion","hash","hash-map","hashmap"],"created_at":"2024-12-14T05:12:38.779Z","updated_at":"2025-04-01T11:50:06.352Z","avatar_url":"https://github.com/bentatum.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# collection-to-hash\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/collection-to-hash.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/collection-to-hash\n[travis-image]: https://img.shields.io/travis/bentatum/collection-to-hash.svg?style=flat-square\n[travis-url]: https://travis-ci.org/bentatum/collection-to-hash\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 collection to a hash\n\n## Tip Jar\nBTC 33dgdBhV1Yf5ERKLLKS7ztEAEEx3zTvSkw\nETH 0xa6938ead6d6820377fed78b657e4eb6c5c44d1b3\n\n## Install\n\n```\nyarn add collection-to-hash\n```\n\n## API\n```js\ncollectionToHash(array, string|function|optional|default:'key', string|function|optional)\n```\n\n## Usage\n\n```js\nimport collectionToHash from 'collection-to-hash'\n\nconst collection = [{ key: 123, ... }, { key: 'abc', ... }]\nconst hash = collectionToHash(collection)\n// const hash = collectionToHash(collection, 'key')\n// const hash = collectionToHash(collection, x =\u003e x.key)\n// const hash = collectionToHash(collection, 'key', x =\u003e x)\n\n/*\n  {\n    123: { ... },\n    abc: { ... }\n  }\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%2Fcollection-to-hash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbentatum%2Fcollection-to-hash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbentatum%2Fcollection-to-hash/lists"}