Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/hughsk/compare
- Owner: hughsk
- License: other
- Created: 2013-06-17T02:46:14.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-06-17T02:46:26.000Z (over 11 years ago)
- Last Synced: 2024-10-17T16:36:07.869Z (22 days ago)
- Size: 102 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
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
```