Skip to content
This repository has been archived by the owner on Apr 1, 2023. It is now read-only.

Latest commit

 

History

History
51 lines (40 loc) · 2.2 KB

isEqual.md

File metadata and controls

51 lines (40 loc) · 2.2 KB

Object Agent

A javascript library for working with objects

npm build coverage deps size vulnerabilities license


isEqual() ⇒ 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 and Objects and Arrays which compare key lengths.

Type Description
*, 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