{"id":18434801,"url":"https://github.com/moroshko/shallow-equal","last_synced_at":"2025-04-04T18:09:00.087Z","repository":{"id":10377652,"uuid":"65546657","full_name":"moroshko/shallow-equal","owner":"moroshko","description":"Minimalistic shallow equality check for arrays/objects","archived":false,"fork":false,"pushed_at":"2023-02-15T21:21:54.000Z","size":2653,"stargazers_count":78,"open_issues_count":13,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-28T17:09:48.601Z","etag":null,"topics":["array","arrays","equal","equality","equality-check","equals","object","objects","shallow"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/moroshko.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-12T10:54:58.000Z","updated_at":"2024-06-17T20:17:41.000Z","dependencies_parsed_at":"2024-06-18T13:38:33.441Z","dependency_job_id":"157bc893-d44b-475b-936e-ae0e4b6c0fd6","html_url":"https://github.com/moroshko/shallow-equal","commit_stats":{"total_commits":32,"total_committers":5,"mean_commits":6.4,"dds":0.46875,"last_synced_commit":"113c9e904a7b38776ea2e27fa85dfae746431823"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moroshko%2Fshallow-equal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moroshko%2Fshallow-equal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moroshko%2Fshallow-equal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moroshko%2Fshallow-equal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moroshko","download_url":"https://codeload.github.com/moroshko/shallow-equal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247226215,"owners_count":20904465,"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","arrays","equal","equality","equality-check","equals","object","objects","shallow"],"created_at":"2024-11-06T06:05:38.467Z","updated_at":"2025-04-04T18:09:00.070Z","avatar_url":"https://github.com/moroshko.png","language":"TypeScript","readme":"## Description\n\nIf you know you have two arrays or two objects in hand, and you want to know if they are shallowly equal or not, this library is for you.\n\n## Features\n\n- Super light\n- No dependencies\n- Thoroughly tested\n\n## Installation\n\n```shell\nnpm install shallow-equal --save\n```\nor\n```shell\nyarn add shallow-equal\n```\n\n## Usage\n\n```js\nimport { shallowEqualArrays } from \"shallow-equal\";\n\nshallowEqualArrays([1, 2, 3], [1, 2, 3]); // =\u003e true\nshallowEqualArrays([{ a: 5 }], [{ a: 5 }]); // =\u003e false\n```\n\n```js\nimport { shallowEqualObjects } from \"shallow-equal\";\n\nshallowEqualObjects({ a: 5, b: \"abc\" }, { a: 5, b: \"abc\" }); // =\u003e true\nshallowEqualObjects({ a: 5, b: {} }, { a: 5, b: {} }); // =\u003e false\n```\n\nYou can also use the generic form, `shallowEqual`. But note that it does runtime type checking in order to decide whether it's comparing arrays or objects, so the convenience comes with a runtime penalty.\n```js\nimport { shallowEqual } from \"shallow-equal\";\n\nshallowEqual([1, 2, 3], [1, 2, 3]); // =\u003e true\nshallowEqual({ a: 5, b: {} }, { a: 5, b: {} }); // =\u003e false\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoroshko%2Fshallow-equal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoroshko%2Fshallow-equal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoroshko%2Fshallow-equal/lists"}