shallowequal

WebJar for shallowequal

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

shallowequal
Последняя версия

Последняя версия

1.1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

shallowequal
WebJar for shallowequal
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/dashed/shallowequal

Скачать shallowequal

Как подключить последнюю версию

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

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

shallowequal Build Status Downloads npm version

shallowequal is like lodash's isEqual (v3.10.1) but for shallow (strict) equal.

shallowequal(value, other, [customizer], [thisArg])

Performs a shallow equality comparison between two values (i.e. value and other) to determine if they are equivalent.

The equality check returns true if value and other are already strictly equal, OR when all the following are true:

  • value and other are both objects with the same keys
  • For each key, the value in value and other are strictly equal (===)

If customizer (expected to be a function) is provided it is invoked to compare values. If customizer returns undefined (i.e. void 0), then comparisons are handled by the shallowequal function instead.

The customizer is bound to thisArg and invoked with three arguments: (value, other, key).

NOTE: Docs are (shamelessly) adapted from lodash's v3.x docs

Install

$ yarn add shallowequal
# npm v5+
$ npm install shallowequal
# before npm v5
$ npm install --save shallowequal

Usage

const shallowequal = require("shallowequal");

const object = { user: "fred" };
const other = { user: "fred" };

object == other;
// → false

shallowequal(object, other);
// → true

Credit

Code for shallowEqual originated from https://github.com/gaearon/react-pure-render/ and has since been refactored to have the exact same API as lodash.isEqualWith (as of v4.17.4).

Development

Chores

  • Lint: yarn lint
  • Test: yarn test
  • Pretty: yarn pretty
  • Prepare: yarn prepare

License

MIT.

Версии библиотеки

Версия
1.1.0
1.0.2
0.2.2