deep-equal-x
node's deepEqual and deepStrictEqual algorithm.
Last updated a year ago by xotic750 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install deep-equal-x 
SYNC missed versions from official npm registry.

Travis status Dependency status devDependency status npm version jsDelivr hits bettercodehub score Coverage Status

deep-equal-x

node's deepEqual and deepStrictEqual algorithm.

module.exports(actual, expected, [strict])boolean

Tests for deep equality. Primitive values are compared with the equal comparison operator ( == ). This only considers enumerable properties. It does not test object prototypes, attached symbols, or non-enumerable properties. This can lead to some potentially surprising results. If strict is true then Primitive values are compared with the strict equal comparison operator ( === ).

Kind: Exported function
Returns: boolean - true if actual and expected are deemed equal, otherwise false.
See: https://nodejs.org/api/assert.html

Param Type Description
actual * First comparison object.
expected * Second comparison object.
[strict] boolean Comparison mode. If set to true use ===.

Example

import deepEqual from 'deep-equal-x';

deepEqual(Error('a'), Error('b'));
// => true
// This does not return `false` because the properties on the  Error object
// are non-enumerable:

deepEqual(4, '4');
// => true

deepEqual({a: 4, b: '1'}, {b: '1', a: 4});
// => true

deepEqual(new Date(), new Date(2000, 3, 14));
// => false

deepEqual(4, '4', true);
// => false

Current Tags

  • 2.1.2                                ...           latest (a year ago)

54 Versions

  • 2.1.2                                ...           a year ago
  • 2.1.1                                ...           a year ago
  • 2.1.0                                ...           a year ago
  • 2.0.13                                ...           a year ago
  • 2.0.12                                ...           a year ago
  • 2.0.11                                ...           a year ago
  • 2.0.10                                ...           a year ago
  • 2.0.9                                ...           a year ago
  • 2.0.8                                ...           a year ago
  • 2.0.7                                ...           a year ago
  • 2.0.6                                ...           a year ago
  • 2.0.5                                ...           a year ago
  • 2.0.4                                ...           a year ago
  • 2.0.3                                ...           a year ago
  • 2.0.2                                ...           a year ago
  • 2.0.1                                ...           a year ago
  • 2.0.0                                ...           a year ago
  • 1.9.0                                ...           3 years ago
  • 1.8.0                                ...           3 years ago
  • 1.7.1                                ...           3 years ago
  • 1.7.0                                ...           3 years ago
  • 1.6.0                                ...           3 years ago
  • 1.5.1                                ...           4 years ago
  • 1.5.0                                ...           4 years ago
  • 1.4.1                                ...           4 years ago
  • 1.4.0                                ...           4 years ago
  • 1.3.0                                ...           4 years ago
  • 1.2.12                                ...           5 years ago
  • 1.2.11                                ...           5 years ago
  • 1.2.10                                ...           5 years ago
  • 1.2.9                                ...           5 years ago
  • 1.2.8                                ...           5 years ago
  • 1.2.7                                ...           5 years ago
  • 1.2.6                                ...           5 years ago
  • 1.2.5                                ...           5 years ago
  • 1.2.4                                ...           5 years ago
  • 1.2.3                                ...           5 years ago
  • 1.2.2                                ...           5 years ago
  • 1.2.1                                ...           5 years ago
  • 1.2.0                                ...           5 years ago
  • 1.1.1                                ...           5 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.11                                ...           5 years ago
  • 1.0.10                                ...           5 years ago
  • 1.0.9                                ...           5 years ago
  • 1.0.8                                ...           5 years ago
  • 1.0.7                                ...           5 years ago
  • 1.0.6                                ...           5 years ago
  • 1.0.5                                ...           5 years ago
  • 1.0.4                                ...           5 years ago
  • 1.0.3                                ...           5 years ago
  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (22)

Copyright 2014 - 2016 © taobao.org |