object-equal
tests wether two objects are equal (shallow).
Last updated 5 years ago by andineck .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install object-equal 
SYNC missed versions from official npm registry.

object-equal

simple function that tests, if two objects are equal (shallow).

install

npm install object-equal

usage

var assert = require('assert');
var equals = require('object-equal');

assert(equals({a:1, b:'nada'}, {b:'nada', a:1}));
assert(!equals({a:1, b:'nada'}, {b:'nada', a:2}));
assert(!equals({a:1, b:''}, {b:'nada', a:1}));
assert(!equals({a:1, b:'nada'}, {a:1}));
assert(!equals({a:1}, {a:1, b:'nada'}));

test

npm test

license

MIT

Current Tags

  • 1.0.0                                ...           latest (5 years ago)

1 Versions

  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 4
This Month 16
Last Day 1
Last Week 8
Last Month 35
Dependencies (0)
None
Dev Dependencies (0)
None

Copyright 2014 - 2016 © taobao.org |