Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@react-hookz/deep-equal

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-hookz/deep-equal - npm Package Compare versions

Comparing version 1.0.4 to 2.0.0

src/comparators.d.ts

76

package.json
{
"name": "@react-hookz/deep-equal",
"version": "1.0.4",
"version": "2.0.0",
"description": "Fast deep equal comparator",

@@ -23,34 +23,39 @@ "keywords": [

},
"files": [
"cjs",
"esm",
"esnext"
],
"main": "cjs/index.js",
"esnext": "esnext/index.js",
"types": "cjs/index.d.ts",
"module": "esm/index.js",
"type": "module",
"main": "./src/index.js",
"types": "./src/index.d.ts",
"sideEffects": false,
"exports": {
".": "./src/index.js"
},
"engines": {
"node": ">=18.0.0"
},
"devDependencies": {
"@commitlint/cli": "^17.0.2",
"@commitlint/config-conventional": "^17.3.0",
"@commitlint/cz-commitlint": "^17.0.3",
"@jamesacarr/eslint-formatter-github-actions": "^0.1.0",
"@commitlint/cli": "^18.6.0",
"@commitlint/config-conventional": "^18.6.0",
"@commitlint/cz-commitlint": "^18.6.0",
"@jamesacarr/jest-reporter-github-actions": "^0.0.4",
"@react-hookz/eslint-config": "^1.6.1",
"@react-hookz/eslint-config": "^2.1.5",
"@react-hookz/eslint-formatter-gha": "^1.0.1",
"@semantic-release/changelog": "^6.0.2",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^8.0.7",
"@types/jest": "^28.1.8",
"commitizen": "^4.2.6",
"commitlint": "^17.3.0",
"concurrently": "^7.6.0",
"husky": "^8.0.2",
"jest": "^28.1.3",
"jest-environment-jsdom": "^29.3.1",
"lint-staged": "^13.1.0",
"semantic-release": "^19.0.5",
"ts-jest": "^28.0.8",
"ttypescript": "^1.5.15",
"typescript": "^4.8.4",
"@semantic-release/github": "^9.2.6",
"@swc/core": "^1.3.107",
"@swc/jest": "^0.2.34",
"@types/jest": "^29.5.12",
"commitizen": "^4.3.0",
"commitlint": "^18.6.0",
"eslint": "^8.56.0",
"eslint-plugin-prettier": "^5.1.3",
"husky": "^9.0.10",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.5.0",
"lint-staged": "^15.2.1",
"prettier": "^3.2.5",
"rimraf": "^5.0.5",
"semantic-release": "^23.0.0",
"ts-jest": "^29.1.2",
"ts-node": "^10.9.2",
"typescript": "^5.3.3",
"yarn": "^1.22.19"

@@ -61,12 +66,9 @@ },

"commit": "git-cz",
"build": "yarn build:clean && tsc --version && tsc",
"build:clean": "yarn rimraf -g ./src/**/*.js ./src/**/*.d.ts",
"benchmark": "yarn build && cd ./benchmark && yarn && yarn benchmark",
"build": "yarn build:cleanup && concurrently yarn:build:cjs yarn:build:esm yarn:build:esnext --kill-others-on-fail",
"build:cleanup": "rimraf ./cjs ./esm ./esnext ./types",
"build:cjs": "ttsc -p ./tsconfig.build.json --module CommonJS --target ES5 --outDir ./cjs",
"build:esm": "ttsc -p ./tsconfig.build.json --module ES6 --target ES5 --outDir ./esm",
"build:esnext": "ttsc -p ./tsconfig.build.json --module ESNext --target ESNext --outDir ./esnext",
"lint": "eslint . --ext .js,.ts",
"lint:fix": "yarn lint --fix",
"test": "jest",
"test:coverage": "yarn test --coverage"
"test:coverage": "yarn test --coverage",
"lint": "eslint .",
"lint:fix": "yarn lint --fix --fix-type problem,suggestion,layout"
},

@@ -79,3 +81,3 @@ "config": {

"lint-staged": {
"*.js": "yarn lint:fix"
"*.{js,jsx,ts,tsx,md,mdx}": "eslint --fix"
},

@@ -82,0 +84,0 @@ "release": {

@@ -11,6 +11,8 @@ <div align="center">

[![Types](https://flat.badgen.net/npm/types/@react-hookz/deep-equal)](https://www.npmjs.com/package/@react-hookz/deep-equal)
[![Tree Shaking](https://flat.badgen.net/bundlephobia/tree-shaking/@react-hookz/deep-equal)](https://bundlephobia.com/result?p=@react-hookz/deep-equal)
[![Tree Shaking](https://badgen.net/
bundlephobia/tree-shaking/@react-hookz/deep-equal)](https://bundlephobia.com/result?p=@react-hookz/deep-equal)
× **[DISCORD](https://discord.gg/Fjwphtu65f)**
× **[CHANGELOG](https://github.com/react-hookz/deep-equal/blob/master/CHANGELOG.md)** ×
× **[CHANGELOG](https://github.com/react-hookz/deep-equal/blob/master/CHANGELOG.md)**
×

@@ -37,18 +39,9 @@ </div>

This package provides three levels of compilation:
> This package distributed with ESNext language level and ES modules system.
> It means that depending on your browser target you might need to transpile it. Every major
> bundler provides a way to transpile `node_modules` fully or partially.
> Address your bundler documentation for more details.
1. **Main**, the `/cjs` folder — CommonJS modules, with ES5 lang level.
2. **ESM**, the `/esm` folder — it is ES modules (browser compatible), with ES5 lang level.
3. **ESNext**, the `/esnext` folder — it is ES modules (browser compatible), with ESNext lang level.
So, if you need default `isEqual`, depending on your needs, you can import in three ways
(there are actually more, but these are the three most common):
```ts
// in case you need cjs modules
import { isEqual } from "@react-hookz/deep-equal";
// in case you need esm modules
import { isEqual } from "@react-hookz/deep-equal/esm";
// in case you want all the recent ES features
import { isEqual } from "@react-hookz/deep-equal/esnext";
import { isEqual } from '@react-hookz/deep-equal';
```

@@ -70,6 +63,7 @@

> **Note:** below tests are mage against certain dataset (can be found in benchmarks), that may or
> may not be representative for your case and your data.
> may not be representative for your case and your data.
> It is better to perform benchmarks against your datasets.
**simple data (non-es6+)**
<pre>

@@ -100,2 +94,3 @@ # mixed (equal)

**complex data (with es6+)**
<pre>

@@ -102,0 +97,0 @@ # mixed (equal)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc