{"id":19042073,"url":"https://github.com/writetome51/arrays-match","last_synced_at":"2026-06-29T00:32:14.307Z","repository":{"id":57169558,"uuid":"150374663","full_name":"writetome51/arrays-match","owner":"writetome51","description":"An array-comparison function","archived":false,"fork":false,"pushed_at":"2021-03-24T03:10:32.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-21T22:44:44.146Z","etag":null,"topics":["arrays","comparison","comparison-tool","javascript","match","matching"],"latest_commit_sha":null,"homepage":null,"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/writetome51.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-26T05:48:53.000Z","updated_at":"2021-03-24T03:10:34.000Z","dependencies_parsed_at":"2022-09-14T02:10:53.650Z","dependency_job_id":null,"html_url":"https://github.com/writetome51/arrays-match","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/writetome51/arrays-match","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Farrays-match","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Farrays-match/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Farrays-match/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Farrays-match/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/writetome51","download_url":"https://codeload.github.com/writetome51/arrays-match/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Farrays-match/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34909137,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-28T02:00:05.809Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["arrays","comparison","comparison-tool","javascript","match","matching"],"created_at":"2024-11-08T22:34:32.568Z","updated_at":"2026-06-29T00:32:14.290Z","avatar_url":"https://github.com/writetome51.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm version](https://badge.fury.io/js/%40writetome51%2Farrays-match.svg)](https://badge.fury.io/js/%40writetome51%2Farrays-match) ![NpmLicense](https://img.shields.io/npm/l/%40writetome51%2Farrays-match.svg) ![npm](https://img.shields.io/npm/dw/%40writetome51%2Farrays-match.svg)\n\n# arraysMatch(array1, array2): boolean\n\nIf `array1` and `array2` match, returns true.  \nIt automatically handles checking nested arrays. \n\nHow the matching is done:  \nIf `(array1 === array2)`, returns true.  \nElse, it tries element-by-element matching:  \nif `array1[i] === array2[i]` for every `i` in `array1` and `array2`, it's a match.  \nIf `array1[i]` and `array2[i]` are both arrays of equal length, they're passed  \ninto a recursive function call.\n\n## Examples\n```js\narraysMatch([], []); // true\n\narraysMatch(['h', 'j'],  ['h', 'j']); // true\n\narraysMatch(['h', 'j'],  ['h', 'j', 'k']); // false\n\narraysMatch([1, 2, [3]], [1, 2, [3]]); // true\n\nlet obj = {prop: 1};\narraysMatch([obj], [{prop:1}]); // false\n\narraysMatch([obj], [obj]); // true\n\nlet obj2 = obj;\narraysMatch([obj], [obj2]); // true\n```\n\n## Installation\n`npm i  @writetome51/arrays-match`\n\n\n## Loading\n```js\nimport {arraysMatch} from '@writetome51/arrays-match'; \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwritetome51%2Farrays-match","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwritetome51%2Farrays-match","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwritetome51%2Farrays-match/lists"}