Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hughsk/compare

Compare each element in an array with every other element in the array.
https://github.com/hughsk/compare

Last synced: 8 days ago
JSON representation

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

Awesome Lists containing this project

README

        

# compare #

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

## Installation ##

``` bash
npm install compare
```

## Usage ##

``` javascript
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
```