Compare each element in an array with every other element in the array.
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE.md
README.md
index.js
package.json
test.js

README.md

compare

Compare each element in an array with every other element in the array.

Installation

npm install compare

Usage

var compare = require('compare')

compare([1, 1, 1, 1], function(a, b) { return a === b }) // true
compare([1, 2, 3, 4], function(a, b) { return a !== b }) // true
compare([1, 2, 3, 3], function(a, b) { return a !== b }) // false