{"id":20614741,"url":"https://github.com/dashed/shallowequal","last_synced_at":"2025-05-16T05:06:41.907Z","repository":{"id":33671802,"uuid":"37324455","full_name":"dashed/shallowequal","owner":"dashed","description":"↔️ Like lodash v3.x isEqualWith but for shallow equal.","archived":false,"fork":false,"pushed_at":"2021-10-18T19:00:09.000Z","size":1076,"stargazers_count":170,"open_issues_count":13,"forks_count":16,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-09T07:03:08.920Z","etag":null,"topics":["comparison","equality","javascript","shallow-equal","shallowequal","utility"],"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/dashed.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":"2015-06-12T13:48:04.000Z","updated_at":"2025-03-25T19:32:47.000Z","dependencies_parsed_at":"2022-08-03T15:18:42.752Z","dependency_job_id":null,"html_url":"https://github.com/dashed/shallowequal","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashed%2Fshallowequal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashed%2Fshallowequal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashed%2Fshallowequal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashed%2Fshallowequal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dashed","download_url":"https://codeload.github.com/dashed/shallowequal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254471061,"owners_count":22076585,"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":["comparison","equality","javascript","shallow-equal","shallowequal","utility"],"created_at":"2024-11-16T11:13:29.946Z","updated_at":"2025-05-16T05:06:38.561Z","avatar_url":"https://github.com/dashed.png","language":"JavaScript","readme":"# shallowequal [![Build Status](https://travis-ci.org/dashed/shallowequal.svg)](https://travis-ci.org/dashed/shallowequal) [![Downloads](https://img.shields.io/npm/dm/shallowequal.svg)](https://npmjs.com/shallowequal) [![npm version](https://img.shields.io/npm/v/shallowequal.svg?style=flat)](https://www.npmjs.com/package/shallowequal)\n\n\u003e `shallowequal` is like lodash's [`isEqual`](https://lodash.com/docs/3.10.1#isEqual) (v3.10.1) but for shallow (strict) equal.\n\n`shallowequal(value, other, [customizer], [thisArg])`\n\nPerforms a **_shallow equality_** comparison between two values (i.e. `value` and `other`) to determine if they are equivalent.\n\nThe equality check returns true if `value` and `other` are already strictly equal, OR when all the following are true:\n\n- `value` and `other` are both objects with the same keys\n- For each key, the value in `value` and `other` are **strictly equal** (`===`)\n\nIf `customizer` (expected to be a function) is provided it is invoked to compare values. If `customizer` returns `undefined` (i.e. `void 0`), then comparisons are handled by the `shallowequal` function instead.\n\nThe `customizer` is bound to `thisArg` and invoked with three arguments: `(value, other, key)`.\n\n**NOTE:** Docs are (shamelessly) adapted from [lodash's v3.x docs](https://lodash.com/docs/3.10.1#isEqual)\n\n## Install\n\n```sh\n$ yarn add shallowequal\n# npm v5+\n$ npm install shallowequal\n# before npm v5\n$ npm install --save shallowequal\n```\n\n## Usage\n\n```js\nconst shallowequal = require(\"shallowequal\");\n\nconst object = { user: \"fred\" };\nconst other = { user: \"fred\" };\n\nobject == other;\n// → false\n\nshallowequal(object, other);\n// → true\n```\n\n## Credit\n\nCode for `shallowEqual` originated from https://github.com/gaearon/react-pure-render/ and has since been refactored to have the exact same API as `lodash.isEqualWith` (as of `v4.17.4`).\n\n## Development\n\n- `node.js` and `npm`. See: https://github.com/creationix/nvm#installation\n- `yarn`. See: https://yarnpkg.com/en/docs/install\n- `npm` dependencies. Run: `yarn install`\n\n### Chores\n\n- Lint: `yarn lint`\n- Test: `yarn test`\n- Pretty: `yarn pretty`\n- Prepare: `yarn prepare`\n\n## License\n\nMIT.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdashed%2Fshallowequal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdashed%2Fshallowequal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdashed%2Fshallowequal/lists"}