{"id":23377951,"url":"https://github.com/beyondjs/equal","last_synced_at":"2026-01-05T05:55:30.916Z","repository":{"id":64126101,"uuid":"572995113","full_name":"beyondjs/equal","owner":"beyondjs","description":"A lightweight and efficient deep equality comparison utility for JavaScript. This package provides flexible comparison of primitive values, arrays, and objects, including nested structures. Supports order-insensitive comparisons and handles circular references, making it ideal for complex data equality checks in various JavaScript environments.","archived":false,"fork":false,"pushed_at":"2025-08-13T22:04:01.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-08-14T03:44:07.870Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/beyondjs.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,"zenodo":null}},"created_at":"2022-12-01T13:30:17.000Z","updated_at":"2025-07-19T16:40:40.000Z","dependencies_parsed_at":"2024-10-08T11:56:43.459Z","dependency_job_id":"70ae989e-77a1-4b5b-a92a-237e5c23bbd8","html_url":"https://github.com/beyondjs/equal","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"7d4c91ccb56391876610eb8db6356adabd746547"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/beyondjs/equal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondjs%2Fequal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondjs%2Fequal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondjs%2Fequal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondjs%2Fequal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beyondjs","download_url":"https://codeload.github.com/beyondjs/equal/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondjs%2Fequal/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271778115,"owners_count":24819262,"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","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"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":[],"created_at":"2024-12-21T18:33:34.358Z","updated_at":"2026-01-05T05:55:30.891Z","avatar_url":"https://github.com/beyondjs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @beyond-js/equal\n\nA flexible deep equality comparison utility for JavaScript objects and arrays.\n\n## Installation\n\n```bash\nnpm install @beyond-js/equal\n```\n\n## Usage\n\n```javascript\nconst equal = require('@beyond-js/equal');\n\n// Compare primitive values\nconsole.log(equal(1, 1)); // true\nconsole.log(equal('a', 'b')); // false\n\n// Compare arrays\nconsole.log(equal([1, 2, 3], [1, 2, 3])); // true\nconsole.log(equal([1, 2, 3], [3, 2, 1])); // false\n\n// Compare objects\nconsole.log(equal({ a: 1, b: 2 }, { b: 2, a: 1 })); // true\nconsole.log(equal({ a: 1, b: 2 }, { a: 1, b: 3 })); // false\n\n// Compare nested structures\nconsole.log(equal({ a: [1, { b: 2 }] }, { a: [1, { b: 2 }] })); // true\n```\n\n## API\n\n### `equal(value1, value2)`\n\nCompares two values for deep equality.\n\n-   `value1`, `value2`: The values to compare. Can be primitives, arrays, or objects.\n-   Returns: `boolean` - `true` if the values are deeply equal, `false` otherwise.\n\n### `equal.generate(value)`\n\nGenerates a comparable string representation of a value.\n\n-   `value`: The value to generate a comparable representation for.\n-   Returns: `string` - A JSON string representation of the value, with arrays and object properties sorted.\n\n## Features\n\n-   Deep equality comparison for nested objects and arrays\n-   Order-insensitive comparison for object properties and array elements\n-   Handles circular references\n-   Lightweight with no external dependencies\n\n## License\n\nMIT © [[BeyondJS](https://beyondjs)]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeyondjs%2Fequal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeyondjs%2Fequal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeyondjs%2Fequal/lists"}