shallow-equal

WebJar for shallow-equal

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

shallow-equal
Last Version

Last Version

1.2.1
Release Date

Release Date

Type

Type

jar
Description

Description

shallow-equal
WebJar for shallow-equal
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

https://github.com/moroshko/shallow-equal

Download shallow-equal

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/shallow-equal/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>shallow-equal</artifactId>
    <version>1.2.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/shallow-equal/
implementation 'org.webjars.npm:shallow-equal:1.2.1'
// https://jarcasting.com/artifacts/org.webjars.npm/shallow-equal/
implementation ("org.webjars.npm:shallow-equal:1.2.1")
'org.webjars.npm:shallow-equal:jar:1.2.1'
<dependency org="org.webjars.npm" name="shallow-equal" rev="1.2.1">
  <artifact name="shallow-equal" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='shallow-equal', version='1.2.1')
)
libraryDependencies += "org.webjars.npm" % "shallow-equal" % "1.2.1"
[org.webjars.npm/shallow-equal "1.2.1"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

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

  • Super light
  • No dependencies
  • Thoroughly tested

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

Versions

Version
1.2.1
1.2.0
1.1.0
1.0.0