All Projects → dashed → Shallowequal

dashed / Shallowequal

Licence: mit
↔️ Like lodash v3.x isEqualWith but for shallow equal.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Shallowequal

Elf Strings
elf-strings will programmatically read an ELF binary's string sections within a given binary. This is meant to be much like the strings UNIX utility, however is purpose built for ELF binaries.
Stars: ✭ 127 (-15.89%)
Mutual labels:  utility
React Sizeme
Make your React Components aware of their width and height!
Stars: ✭ 1,770 (+1072.19%)
Mutual labels:  utility
Wallutils
🌆 Utilities for handling monitors, resolutions, wallpapers and timed wallpapers
Stars: ✭ 145 (-3.97%)
Mutual labels:  utility
Paas Profiles
Making Platform as a Service offerings comparable - Ecosystem profiles for portability matching.
Stars: ✭ 127 (-15.89%)
Mutual labels:  comparison
Nest Emitter
Strongly 💪🏼 Typed Eventemitter Module For Nestjs Framework 🦁
Stars: ✭ 133 (-11.92%)
Mutual labels:  utility
Fac
Easy-to-use CUI for fixing git conflicts
Stars: ✭ 1,738 (+1050.99%)
Mutual labels:  utility
Slickr
A collection of python and bash scripts to collect and analyze frame rendering performance in Android apps.
Stars: ✭ 126 (-16.56%)
Mutual labels:  utility
Fastify Sensible
Defaults for Fastify that everyone can agree on
Stars: ✭ 147 (-2.65%)
Mutual labels:  utility
Nightfall
A menu bar utility for toggling dark mode in macOS, written in Swift.
Stars: ✭ 131 (-13.25%)
Mutual labels:  utility
Sitediff
SiteDiff makes it easy to see differences between two versions of a website.
Stars: ✭ 139 (-7.95%)
Mutual labels:  comparison
Asciigraph
Go package to make lightweight ASCII line graph ╭┈╯ in command line apps with no other dependencies.
Stars: ✭ 1,805 (+1095.36%)
Mutual labels:  utility
Calypsobot
A fully customizable bot built with discord.js
Stars: ✭ 131 (-13.25%)
Mutual labels:  utility
Shpotify
A command-line interface to Spotify.
Stars: ✭ 1,782 (+1080.13%)
Mutual labels:  utility
Interactor
A Simple Website User Interaction Tracker.
Stars: ✭ 128 (-15.23%)
Mutual labels:  utility
Image Comparison
Published on Maven Central and jCenter Java Library that compares 2 images with the same sizes and shows the differences visually by drawing rectangles. Some parts of the image can be excluded from the comparison. Can be used for automation qa tests.
Stars: ✭ 145 (-3.97%)
Mutual labels:  comparison
Vectoriconsroundup
A comparison between popular vectorial icon fonts
Stars: ✭ 126 (-16.56%)
Mutual labels:  comparison
Packagehunter
📥 [Android Library] Hunt down all package information
Stars: ✭ 137 (-9.27%)
Mutual labels:  utility
Japanese.js
Util collection for Japanese text processing. Hiraganize, Katakanize, and Romanize.
Stars: ✭ 150 (-0.66%)
Mutual labels:  utility
Georaptor
Python Geohash Compression Tool
Stars: ✭ 143 (-5.3%)
Mutual labels:  utility
Benchmarks
Comparison tools
Stars: ✭ 139 (-7.95%)
Mutual labels:  comparison

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].