{"id":15677533,"url":"https://github.com/kikobeats/hyperdiff","last_synced_at":"2026-04-03T23:02:55.534Z","repository":{"id":15323789,"uuid":"77899362","full_name":"Kikobeats/hyperdiff","owner":"Kikobeats","description":"Find common, removed and added element between two collections.","archived":false,"fork":false,"pushed_at":"2025-11-22T07:28:36.000Z","size":114,"stargazers_count":14,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-22T09:13:20.017Z","etag":null,"topics":["comparison","difference","intersection"],"latest_commit_sha":null,"homepage":"https://kikobeats.github.io/hyperdiff","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/Kikobeats.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-01-03T08:45:07.000Z","updated_at":"2025-11-22T07:28:39.000Z","dependencies_parsed_at":"2024-06-18T21:30:49.684Z","dependency_job_id":"d5600547-9afe-4c57-981d-9dd8182f5339","html_url":"https://github.com/Kikobeats/hyperdiff","commit_stats":{"total_commits":71,"total_committers":4,"mean_commits":17.75,"dds":"0.18309859154929575","last_synced_commit":"f7da1e9cbc31aae9979475469eb1b836589cfb89"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/Kikobeats/hyperdiff","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kikobeats%2Fhyperdiff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kikobeats%2Fhyperdiff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kikobeats%2Fhyperdiff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kikobeats%2Fhyperdiff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kikobeats","download_url":"https://codeload.github.com/Kikobeats/hyperdiff/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kikobeats%2Fhyperdiff/sbom","scorecard":{"id":78616,"data":{"date":"2025-08-11","repo":{"name":"github.com/Kikobeats/hyperdiff","commit":"70cd5bbd9ba19d570efabdc62ff9e9d1c5ec706d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.7,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/20 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":3,"reason":"4 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/main.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/Kikobeats/hyperdiff/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/Kikobeats/hyperdiff/main.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/Kikobeats/hyperdiff/main.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/main.yml:25","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 10 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-15T05:20:10.940Z","repository_id":15323789,"created_at":"2025-08-15T05:20:10.941Z","updated_at":"2025-08-15T05:20:10.941Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31381009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T21:40:47.592Z","status":"ssl_error","status_checked_at":"2026-04-03T21:40:05.436Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["comparison","difference","intersection"],"created_at":"2024-10-03T16:09:50.085Z","updated_at":"2026-04-03T23:02:55.508Z","avatar_url":"https://github.com/Kikobeats.png","language":"JavaScript","readme":"# hyperdiff\n\n![Last version](https://img.shields.io/github/tag/Kikobeats/hyperdiff.svg?style=flat-square)\n[![Coverage Status](https://img.shields.io/coveralls/Kikobeats/hyperdiff.svg?style=flat-square)](https://coveralls.io/github/Kikobeats/hyperdiff)\n[![NPM Status](https://img.shields.io/npm/dm/hyperdiff.svg?style=flat-square)](https://www.npmjs.org/package/hyperdiff)\n\n\u003e Find common, removed and added element between two collections.\n\n## Install\n\n```bash\n$ npm install hyperdiff --save\n```\n\n## Usage\n\nUsing a flat `Array`:\n\n```js\nconst diff = require('hyperdiff')\n\nconst result = diff(\n  [1, 2, 3, 4, 5, 6],\n  [1, 2, 4, 5, 6, 0, 9, 10]\n)\n\nconsole.log(result)\n// {\n//   added: [ 0, 9, 10 ],\n//   removed: [ 3 ],\n//   common: [ 1, 2, 4, 5, 6 ]\n// }\n```\n\nUsing an `Array` of `Object`'s (in this case you need to provide the unique id):\n\n```js\nconst diff = require('hyperdiff')\nconst result = diff(\n  [\n    { id: 1, name: 'a' },\n    { id: 2, name: 'b' },\n    { id: 3, name: 'c' },\n    { id: 4, name: 'd' },\n    { id: 5, name: 'e' }\n  ],\n  [\n    { id: 1, name: 'a' },\n    { id: 2, name: 'b' },\n    { id: 7, name: 'e' }\n  ],\n  'id'\n)\n\nconsole.log(result)\n// {\n//   added: [ { id: 7, name: 'e' } ],\n//   removed: [ { id: 3, name: 'c' }, { id: 4, name: 'd' }, { id: 5, name: 'e' } ],\n//   common: [ { id: 1, name: 'a' }, { id: 2, name: 'b' } ]\n// }\n```\n\nIt's also support multiple properties as id or provide a `function`.\n\n## Benchmark\n\n```bash\n❯ node bench.js\nsimpleArrayDiff*1000: 143.742ms\nhyperDiff*1000: 80.234ms\nsimpleArrayDiff*1000: 143.405ms\nhyperDiff*1000: 75.803ms\n```\n\n## API\n\n### hyperdiff(orig, dist, [ids])\n\n#### orig\n\n*Required*\u003cbr\u003e\nType: `array`\n\nFirst array for be compared.\n\n#### dist\n\n*Required*\u003cbr\u003e\nType: `array`\n\nSecond array for be compared. Notes the results are modeled from the second array.\n\n#### ids\n\nType: `string`|`array`|`function`\n\nIn the case that you provide an `Array` of `Object`'s, you need to specify the `key`'s to be used as `id`.\n\n## Related\n\n* [redis-diff](https://github.com/Kikobeats/redis-diff) - Perform a diff comparison backed by redis.\n\n## License\n\nMIT © [Kiko Beats](https://github.com/Kikobeats).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkikobeats%2Fhyperdiff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkikobeats%2Fhyperdiff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkikobeats%2Fhyperdiff/lists"}