Skip to content

Latest commit

 

History

History
51 lines (40 loc) · 2.3 KB

isEqual.md

File metadata and controls

51 lines (40 loc) · 2.3 KB

Object Agent

A javascript library for working with objects

npm build coverage deps size vulnerabilities license


isEqual(args) ⇒ boolean

Shallow compares two or more items. All items are compared with SameValue equality except Dates and RegExps which compare their values with SameValue equality, Objects and Arrays which compare key lengths, and instances of objects that compare all properties and prototype objects.

Param Type Description
args *, Array Can be an array of items or multiple args of items.

Example

import { isEqual } from 'object-agent';

isEqual(null, undefined);
// => false

isEqual('a', 'a', 'a');
// => true

isEqual('a', 'a', 'a', null);
// => false