arr-equal
v1.1.7
Published
check if two arrays are equal with options (order? shallow? ...)
Downloads
25
Readme
arr-equal
Check if two arrays are equal with options (deep? shallow? ...)
Deep comparison compares arrays recursively.
Other type of objects (objets, buffers, ...) are still compared with strict equality (===).
Author: Loïc Formont
License: MIT Licensed
Example
var equal = require("arr-equal");
equal([1, 2, 3], [1, 2, 3]) ==> true
equal([1, 2, 3], [1, 3, 2]) ==> false
equal([1, 2, 3], [1, 3, 2], {order: false}) ==> true
equal([1, [2, 3]], [1, [2, 3]]) ==> false
equal([1, [2, 3]], [1, [2, 3]], {deep: true}) ==> true