Giter VIP home page Giter VIP logo

deep-equal-x's Introduction

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

deep-equal-x's People

Contributors

xotic750 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

deep-equal-x's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.