Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
recursive-comparator
Advanced tools
Compare variables of any type with customizable parameters
Fast optimized algorithm to compare two variables of any type in JavaScript. The algorithm supports recursive comparison with nested items and performs the operations in a comparative way - so that in case of differences it automatically returns "false" instead of continuing to compare. The order of elements is taken into account in any operation. The function also supports comparison functions that will dictate the behavior the comparator will use to check the data.
Version | Branch |
---|---|
development | main |
1.1.6 | v1.1.6 |
To get the script just clone that repository (or get the version in "Releases" section) and import "compare" from "recursiveComparator.js" and use like the examples:
Without conditional function parameter:
compare([{a: 1}], [{a: 1}]); //(May be equal) True
compare([[1]], [[3]]); //(May be equal) False
With conditional function parameter:
compare([{a: 1}], [{a: 1}], (a, b) => !compare(a, b)); //(May pass in the function parameters) False
compare([{a: 1}], [{a: 1}], (a, b) => compare(a, b)); //(May pass in the function parameters) True
FAQs
Compare variables of any type with customizable parameters
The npm package recursive-comparator receives a total of 0 weekly downloads. As such, recursive-comparator popularity was classified as not popular.
We found that recursive-comparator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.