{"id":29702478,"url":"https://github.com/devgateway/underscore-groups-by","last_synced_at":"2025-07-23T12:39:27.801Z","repository":{"id":20052064,"uuid":"23320523","full_name":"devgateway/underscore-groups-by","owner":"devgateway","description":"A many-to-many version of underscore's _.groupBy","archived":false,"fork":false,"pushed_at":"2014-08-25T16:28:30.000Z","size":108,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-07-06T08:05:40.482Z","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/devgateway.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":"2014-08-25T16:27:28.000Z","updated_at":"2014-08-25T16:28:30.000Z","dependencies_parsed_at":"2022-09-01T10:11:33.361Z","dependency_job_id":null,"html_url":"https://github.com/devgateway/underscore-groups-by","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/devgateway/underscore-groups-by","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devgateway%2Funderscore-groups-by","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devgateway%2Funderscore-groups-by/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devgateway%2Funderscore-groups-by/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devgateway%2Funderscore-groups-by/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devgateway","download_url":"https://codeload.github.com/devgateway/underscore-groups-by/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devgateway%2Funderscore-groups-by/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266680644,"owners_count":23967794,"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-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":"2025-07-23T12:39:26.021Z","updated_at":"2025-07-23T12:39:27.786Z","avatar_url":"https://github.com/devgateway.png","language":"JavaScript","readme":"Underscore GroupsBy Mixin\n=========================\n\nA many-to-many version of [underscore's `_.groupBy`](http://underscorejs.org/#groupBy).\n\n\nInstall\n-------\n\nThis module should work with plain old javascript, browserify, and requirejs.\n\nFor regular javascript, make sure you include it after underscore. Underscore is the only dependency.\n\nFor browserify and requirejs, you need to `require` it, but you don't need to do anything with the return value if you don't want -- it will mix itself into underscore for you.\n\n### Install with npm\n\n```bash\n$ npm install groups-by\n```\n\n\nBrowserify Example\n------------------\n\n```javascript\n\nvar _ = require('underscore');\nrequire('underscore-groups-by');\n\n\nvar things = [\n  {n: [1], name: 'alice'},\n  {n: [2], name: 'bob'},\n  {n: [1, 2], name: 'alob'}\n];\n\nvar grouped = _(things).groupsBy(function (thing) {\n  return thing.n;  // return value must be an array\n});\n```\n\nlogging the result...\n\n```javascript\nconsole.log(grouped);\n```\n\nshould yield\n\n```javascript\n{\n  1: [\n    {n: [1], name: 'alice'},\n    {n: [1, 2], name: 'alob'}\n  ],\n  2: [\n    {n: [2], name: 'bob'},\n    {n: [1, 2], name: 'alob'}\n  ]\n}\n```\n\n\nLicense\n-------\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevgateway%2Funderscore-groups-by","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevgateway%2Funderscore-groups-by","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevgateway%2Funderscore-groups-by/lists"}