Web Development,
JavaScript, jQuery,
HTML and CSS stuff.

equiv

I've come up here with a solution to compare recursively any type of data in JavaScript. Very useful for test suites' assertions. It has been merged in QUnit as a service function to the same test assertion.

Download only the equiv code

Simple JavaScript function to test 2 or more arguments for equality. Return true if they are deeply equivalent, false otherwise. Use this if you want to use it outside any test suites purposes.

Download only the patched testrunner.js

It includes the allSame API which is a version of the same API. It isn't included in the current QUnit API yet. It allows multiple arguments. See some examples of use here. Of course equiv.js is included. Note that the current equiv and hoozit code is a complete refactoring of what's in the current version of testrunner.js. It has not yet been updated in the QUnit's testrunner.

Download everything in an archive (tar.gz)

For developers: equiv.js + testrunner.js + QUnit test suites assertions (that I've used to develop equiv) + jQuery and QUnit sources all ready to work locally. Just open up index.html to launch the test suites. allSame API has been added in testrunner.js

All code and content by Philippe Rathé is licensed under a Creative Commons Attribution 2.5 Canada License (unless otherwise mentioned).
Creative Commons License