Skip to content
This repository has been archived by the owner on Feb 28, 2021. It is now read-only.

pouc/arr-equal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

check if two arrays are equal with options (order? shallow? ...)

Resources

License

Stars

Watchers

Forks

Packages

No packages published