1.1.7 • Published 7 years ago

arr-equal v1.1.7

Weekly downloads
13
License
MIT
Repository
github
Last release
7 years ago

arr-equal

GitHub version npm version NPM monthly downloads Build Status Dependency Status Coverage Status Known Vulnerabilities

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