{"id":19019058,"url":"https://github.com/zanonnicola/mobik","last_synced_at":"2026-05-13T13:49:08.721Z","repository":{"id":57299720,"uuid":"160584028","full_name":"zanonnicola/mobik","owner":"zanonnicola","description":"Tiny Array utility for merging an array of objects by a given key","archived":false,"fork":false,"pushed_at":"2018-12-06T17:19:21.000Z","size":386,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-12T17:08:19.811Z","etag":null,"topics":["array-manipulations","es6","js","library","nodejs"],"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/zanonnicola.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":"2018-12-05T22:00:23.000Z","updated_at":"2023-03-10T08:30:59.000Z","dependencies_parsed_at":"2022-08-26T21:50:15.614Z","dependency_job_id":null,"html_url":"https://github.com/zanonnicola/mobik","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zanonnicola%2Fmobik","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zanonnicola%2Fmobik/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zanonnicola%2Fmobik/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zanonnicola%2Fmobik/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zanonnicola","download_url":"https://codeload.github.com/zanonnicola/mobik/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240063928,"owners_count":19742227,"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":["array-manipulations","es6","js","library","nodejs"],"created_at":"2024-11-08T20:10:41.658Z","updated_at":"2026-04-27T15:30:18.974Z","avatar_url":"https://github.com/zanonnicola.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://i.ibb.co/xXcKJnn/mobik.jpg\" width=\"597\" alt=\"MOBIK\"\u003e\n\u003c/p\u003e\n\n# Mobik\n\nFast **273 bytes** `Array` utility for merging an array of objects by a given key.\n\n## :package: Installation\n\n```bash\nnpm install mobik --save\n```\n\n## :rocket: Load\n\n```js\n// using es modules\nimport mobik from 'mobik'\n\n// common.js\nconst mobik = require('mobik')\n\n```\n\nOr use script tags and globals.\n\n```html\n\u003cscript src=\"https://unpkg.com/mobik\"\u003e\u003c/script\u003e\n```\n\nAnd then grab it off the global like so:\n\n```js\nconst mobik = mobik.default;\n```\n\n## :bulb: Usage\n\nLet's assume you want to group a set of objects in an array by key \n\n```javascript\nconst newArray = mobik('a', [{a: 1, b: 2}, {c: 3, a: 1}]);\n\n/*\n[\n  {\n    a: 1,\n    b: 2,\n    c: 3\n  }\n]\n*/\n```\n\n\u003e It works with nested objects too!\n\n```javascript\nconst newArray = mobik('a', [{a: 1, b: 2}, {c: {d: 4}, a: 1}]);\n\n/*\n[\n  {\n    a: 1,\n    b: 2,\n    c: {\n      d: 4\n    }\n  }\n]\n*/\n```\n\n## API\n\n#### `mobik(key: String, array: Array)` [required]\n\nReturns an `Array` with a merged `Object`\n\nOR `[]` when no key is found.\n\n## Tests\n\n`npm test`\n\n## Legal\n\nReleased under MIT license.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzanonnicola%2Fmobik","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzanonnicola%2Fmobik","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzanonnicola%2Fmobik/lists"}