Narcoleptic Programmers' Medicine
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

neatequal

1.0.0 • Public • Published

neatequal

neatequal is a neater deepEqual.

NPM version Build status Dependency Status devDependency Status Coverage Status Code Climate

neatEqual capture

Installation

First install neatequal in you project:

npm install --save neatequal

Getting started

Then, use it:

var neatequal = require('neatequal');
 
var expectedFruits = [{
  name: 'orange'
  count: 2,
  colors: ['orange']
}, {
    name: 'banana',
  count: 0,
  colors: ['yellow', 'white']
}, {
    name: 'kiwi',
  count: 8,
  colors: ['brown', 'green']
}];
 
var currentFruits = [{
  name: 'orange'
  count: 2,
  colors: ['yellow', 'orange']
}, {
    name: 'banana',
  count: 1,
  colors: ['white']
}];
 
neatequal(expectedFruits, currentFruits);

API

neatequal(current:Object, expected:Object)

Throws an exception if current and expected objects doens'nt equal.

Contribute

Feel free to submit us your improvements. To do so, you must accept to publish your code under the MIT license.

To start contributing, first run the following to setup the development environment:

git clone git@github.com:nfroidure/neatequal.git
cd neatequal
npm install

Then, run the tests:

npm test

Stats

NPM NPM

install

npm i neatequal

Downloadsweekly downloads

30,894

version

1.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability