{"id":15155347,"url":"https://github.com/afeiship/next-flat","last_synced_at":"2026-01-19T08:31:41.767Z","repository":{"id":57122744,"uuid":"104323861","full_name":"afeiship/next-flat","owner":"afeiship","description":"Flattens `array` a single or multiple level deep.","archived":false,"fork":false,"pushed_at":"2023-04-17T13:55:22.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-05T01:29:35.333Z","etag":null,"topics":["array","flat","flatten","next"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/afeiship.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-21T08:47:32.000Z","updated_at":"2023-04-17T13:34:09.000Z","dependencies_parsed_at":"2024-08-20T17:01:19.109Z","dependency_job_id":"3ee39edc-5c33-424a-85a3-6407b6b169a8","html_url":"https://github.com/afeiship/next-flat","commit_stats":{"total_commits":25,"total_committers":1,"mean_commits":25.0,"dds":0.0,"last_synced_commit":"257b1e005ecddea23994babc5d66f5603a88abda"},"previous_names":["afeiship/next-flatten"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/afeiship/next-flat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Fnext-flat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Fnext-flat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Fnext-flat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Fnext-flat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/afeiship","download_url":"https://codeload.github.com/afeiship/next-flat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Fnext-flat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28564011,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T03:31:16.861Z","status":"ssl_error","status_checked_at":"2026-01-19T03:31:15.069Z","response_time":67,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["array","flat","flatten","next"],"created_at":"2024-09-26T18:20:29.328Z","updated_at":"2026-01-19T08:31:41.745Z","avatar_url":"https://github.com/afeiship.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# next-flat\n\u003e Flattens `array` a single or multiple level deep.\n\n[![version][version-image]][version-url]\n[![license][license-image]][license-url]\n[![size][size-image]][size-url]\n[![download][download-image]][download-url]\n\n## installation\n```bash\nnpm install -S @jswork/next-flat\n```\n\n## usage\n```js\nimport '@jswork/next-flat';\n\nconst res = nx.flat([[1, 2, 3], [4, 5]]); \n// [1, 2, 3, 4, 5]\n```\n\n## other solution\n```js\nfunction flattenArrayOfArrays(a, r) {\n  if (!r) { r = [] }\n  for (var i = 0; i \u003c a.length; i++) {\n    if (a[i].constructor == Array) {\n      r.concat(flattenArrayOfArrays(a[i], r));\n    } else {\n      r.push(a[i]);\n    }\n  }\n  return r;\n}\n```\n\n## license\nCode released under [the MIT license](https://github.com/afeiship/next-flat/blob/master/LICENSE.txt).\n\n[version-image]: https://img.shields.io/npm/v/@jswork/next-flat\n[version-url]: https://npmjs.org/package/@jswork/next-flat\n\n[license-image]: https://img.shields.io/npm/l/@jswork/next-flat\n[license-url]: https://github.com/afeiship/next-flat/blob/master/LICENSE.txt\n\n[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-flat\n[size-url]: https://github.com/afeiship/next-flat/blob/master/dist/next-flat.min.js\n\n[download-image]: https://img.shields.io/npm/dm/@jswork/next-flat\n[download-url]: https://www.npmjs.com/package/@jswork/next-flat\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafeiship%2Fnext-flat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fafeiship%2Fnext-flat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafeiship%2Fnext-flat/lists"}