Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

shallow-same

shoaibamin-dev51MIT1.0.10

A light-weight JavaScript utility to compare numbers, strings, arrays, and objects.

shallow, compare, same, isequal, equal, equate, comparison, triple equals, compare objects, same objects, isequal objects, equate objects, object comparison

readme

A light-weight JavaScript utility to compare numbers, strings, arrays, and objects.

Installation

$ yarn add shallow-same
$ npm install shallow-same

Usage

const ss = require('shallow-same');
// import ss from 'shallow-same';

const object1 = { hello: 'world', shoaib: 'amin' };
const object3 = { shoaib: 'amin', hello: 'world' };

object1 === object3;
// → false
ss(object1, object3);
// → true

Please refer to the complete documentation in my GitHub README