/ never-odd-or-even / back / node_modules / shallow-equal /

[ICO]NameLast modifiedSizeDescription
[PARENTDIR]Parent Directory  -  
[DIR]arrays/2 years ago -  
[DIR]dist/2 years ago -  
[DIR]objects/2 years ago -  
[   ]LICENSE39 years ago1.1K 
[TXT]README.md39 years ago1.1K 
[   ]package.json2 years ago2.9K 
README.md

Build Status NPM Version

Description

If you know you have two arrays or two objects in hand, and you want to know if they are shallowly equal or not, this library is for you.

Features

Installation

npm install shallow-equal --save

Usage

import { shallowEqualArrays } from "shallow-equal";

shallowEqualArrays([1, 2, 3], [1, 2, 3]); // => true
shallowEqualArrays([{ a: 5 }], [{ a: 5 }]); // => false
import { shallowEqualObjects } from "shallow-equal";

shallowEqualObjects({ a: 5, b: "abc" }, { a: 5, b: "abc" }); // => true
shallowEqualObjects({ a: 5, b: {} }, { a: 5, b: {} }); // => false

License

MIT

Apache/2.4.38 (Debian) Server at www.karls.computer Port 80