{"_id":"react-fast-compare@3.2.3-canary-20261105232110","nyc":{"exclude":["**/test/**","node_modules"],"reporter":["lcov","text-summary"]},"bugs":{"url":"https://github.com/FormidableLabs/react-fast-compare/issues"},"dist":{"shasum":"da61106704ad19765fc1077ea3f786ae9a1d6784","tarball":"http://registry-npm.ywwl.com/react-fast-compare/download/react-fast-compare-3.2.3-canary-20261105232110.tgz","fileCount":5,"integrity":"sha512-fEQuNFfIoKM1in46eqjBBaYj3dXykxId36XLEXT/Ydv7Ry0LMyvxCKoRlq55OGLqfsR5FD+kK7jepealARak1w==","signatures":[{"sig":"MEUCIQDjSbo+RsSpxzoe9ZC9pa5kXqPJP+ZvO9nVYJ05KyJvKAIgdIEECHIbQw/D7Yv3FRCfj08iRv+ktPzxZvB+X4lcOwU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCRTtjJm8g9Uu4PUC9xHt+PGe1uLeEyawZGlCYA716LFAIgXZ693ONG9cZOr5UnvawZTcNxcxqv5qiM3UIX8nvnlog="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/react-fast-compare@3.2.3-canary-20261105232110","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":15591,"size":6073,"noattachment":false,"key":"/react-fast-compare/-/react-fast-compare-3.2.3-canary-20261105232110.tgz"},"main":"index.js","name":"react-fast-compare","types":"index.d.ts","author":"Chris Bolin","license":"MIT","scripts":{"test":"builder concurrent --buffer eslint tslint test-ts-usage test-ts-defs test-node-cov test-browser","eslint":"eslint \"*.js\" benchmark test","tslint":"eslint test/typescript/*.tsx","compress":"terser --compress --mangle=\"toplevel:true\" -- index.js","benchmark":"node benchmark","changeset":"changeset","test-node":"mocha \"test/node/*.spec.js\"","preversion":"pnpm test","size-min-gz":"pnpm -s compress | gzip -9 | wc -c","test-browser":"karma start test/browser/karma.conf.js","test-ts-defs":"tsc --target ES5 index.d.ts","test-node-cov":"nyc mocha \"test/node/*.spec.js\"","test-ts-usage":"tsc --esModuleInterop --jsx react --noEmit test/typescript/sample-react-redux-usage.tsx test/typescript/sample-usage.tsx"},"typings":"index.d.ts","version":"3.2.3-canary-20261105232110","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"1742f2e9-4bf6-4414-91bf-260972922992"}},"homepage":"https://github.com/FormidableLabs/react-fast-compare","keywords":["fast","equal","react","compare","shouldComponentUpdate","deep-equal"],"repository":{"url":"https://github.com/FormidableLabs/react-fast-compare","type":"git"},"description":"Fastest deep equal comparison for React. Great for React.memo & shouldComponentUpdate. Also really fast general-purpose deep comparison.","directories":{},"maintainers":[{"name":"sarmeyer","email":"sarahmichelleegan@gmail.com"},{"name":"mariano-formidable","email":"mariano.martinez@formidable.com"},{"name":"ryan.roemer","email":"ryan@loose-bits.com"},{"name":"formidable-owner","email":"admin@formidablelabs.com"},{"name":"formidablelabs","email":"npm@formidablelabs.com"},{"name":"sarahformidable","email":"sarah.wright@formidable.com"},{"name":"ceceppa","email":"senesealessandro@gmail.com"}],"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.1.0","jsdom":"^21.1.0","karma":"^6.4.1","mocha":"^11.8.0","react":"^18.2.0","redux":"^4.2.1","sinon":"^15.0.1","assert":"^2.0.0","eslint":"^8.35.0","lodash":"^4.17.10","preact":"^10.13.1","terser":"^5.16.6","builder":"^5.0.0","core-js":"^3.29.0","process":"^0.11.10","webpack":"^5.76.0","benchmark":"^2.1.4","react-dom":"^18.2.0","nano-equal":"^2.0.2","typescript":"^4.9.5","@babel/core":"^7.21.0","@types/node":"^18.15.0","karma-mocha":"^2.0.1","react-redux":"^8.0.5","@types/react":"^16.9.35","babel-loader":"^9.1.2","jsdom-global":"^3.0.2","karma-webpack":"^5.0.0","@changesets/cli":"^3.0.3","fast-deep-equal":"3.1.3","@types/react-dom":"^16.9.8","@babel/preset-env":"^7.20.2","@types/react-redux":"^7.1.25","eslint-plugin-react":"^7.32.2","react-test-renderer":"^18.2.0","shallow-equal-fuzzy":"0.0.2","@testing-library/dom":"^9.0.1","karma-mocha-reporter":"^2.2.5","karma-chrome-launcher":"^3.1.1","karma-safari-launcher":"^1.0.0","karma-firefox-launcher":"^2.1.2","@testing-library/preact":"^3.2.3","@typescript-eslint/parser":"^5.54.1","@changesets/changelog-github":"^1.0.1"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/react-fast-compare_3.2.3-canary-20261105232110_1793920932632_0.14088387516387846"},"readme":"[![React Fast Compare — Nearform](https://oss.nearform.com/api/banner.svg?badge=react-fast-compare&bg=2f8f83)](https://nearform.com/open-source/)\n\n[![Downloads][downloads_img]][npm_site]\n[![GH Actions Status][actions_img]][actions_site]\n[![npm version][npm_img]][npm_site]\n[![Maintenance Status][maintenance_img]](#maintenance-status)\n\nThe fastest deep equal comparison for React. Very quick general-purpose deep\ncomparison, too. Great for `React.memo` and `shouldComponentUpdate`.\n\nThis is a fork of the brilliant\n[fast-deep-equal](https://github.com/epoberezkin/fast-deep-equal) with some\nextra handling for React.\n\n## Install\n\n```sh\n$ npm install react-fast-compare\n```\n\n## Highlights\n\n- ES5 compatible; works in node.js (0.10+) and browsers (IE9+)\n- deeply compares any value (besides objects with circular references)\n- handles React-specific circular references, like elements\n- checks equality of Date and RegExp objects\n- should be as fast as [fast-deep-equal](https://github.com/epoberezkin/fast-deep-equal) via a single unified library, and with added guardrails for circular references.\n- small: under 660 bytes minified+gzipped\n\n## Usage\n\n```jsx\nconst isEqual = require('react-fast-compare');\n\n// general usage\nconsole.log(isEqual({ foo: 'bar' }, { foo: 'bar' })); // true\n\n// React.memo\n// only re-render ExpensiveComponent when the props have deeply changed\nconst DeepMemoComponent = React.memo(ExpensiveComponent, isEqual);\n\n// React.Component shouldComponentUpdate\n// only re-render AnotherExpensiveComponent when the props have deeply changed\nclass AnotherExpensiveComponent extends React.Component {\n  shouldComponentUpdate(nextProps) {\n    return !isEqual(this.props, nextProps);\n  }\n  render() {\n    // ...\n  }\n}\n```\n\n## Do I Need `React.memo` (or `shouldComponentUpdate`)?\n\n> What's faster than a really fast deep comparison? No deep comparison at all.\n\n—This Readme\n\nDeep checks in `React.memo` or a `shouldComponentUpdate` should not be used blindly.\nFirst, see if the default\n[React.memo](https://react.dev/reference/react/memo) or\n[PureComponent](https://react.dev/reference/react/PureComponent)\nwill work for you. If it won't (if you need deep checks), it's wise to make\nsure you've correctly identified the bottleneck in your application by\n[profiling the performance](https://react.dev/reference/react/Profiler).\nAfter you've determined that you _do_ need deep equality checks and you've\nidentified the minimum number of places to apply them, then this library may\nbe for you!\n\n## Benchmarking this Library\n\n`react-fast-compare` is based on `fast-deep-equal`, and aims to be as fast on\ngeneric data while also handling React elements. The benchmark\n([`bench/`](./bench/compare.bench.mjs), Vitest's\n[benchmarking](https://vitest.dev/guide/benchmarking)) compares this code with\nthe last published version and with `fast-deep-equal`, over the same test cases\nthe tests use:\n\n```sh\n$ pnpm install\n$ pnpm bench\n```\n\nAbsolute numbers depend on the machine; compare rows from the same run. CI adds\nthe results to the job summary of each run.\n\n## Differences between this library and `fast-deep-equal`\n\n`react-fast-compare` is based on `fast-deep-equal`, with some additions:\n\n- `react-fast-compare` has `try`/`catch` guardrails for stack overflows from undetected (non-React) circular references.\n- `react-fast-compare` has a _single_ unified entry point for all uses. No matter what your target application is, `import equal from 'react-fast-compare'` just works. `fast-deep-equal` has multiple entry points for different use cases.\n\nThis version of `react-fast-compare` tracks `fast-deep-equal@3.1.3`.\n\n## Bundle Size\n\nThere are a variety of ways to calculate bundle size for JavaScript code.\n`pnpm size` ([`scripts/size.mjs`](./scripts/size.mjs)) minifies `index.js` with\nterser, mangling top-level names, and reports the raw, minified, gzip and\nbrotli sizes. CI adds the same report to each run's job summary.\n[Bundlephobia's calculation](https://bundlephobia.com/result?p=react-fast-compare) is slightly higher,\nas they [do not mangle during minification](https://github.com/pastelsky/package-build-stats/blob/v6.1.1/src/getDependencySizeTree.js#L139).\n\n## License\n\n[MIT](./LICENSE)\n\n## Contributing\n\nPlease see our [contributions guide](./CONTRIBUTING.md).\n\n## Maintenance Status\n\n**Active:** Nearform is actively working on this project, and we expect to continue work for the foreseeable future. Bug reports, feature requests and pull requests are welcome.\n\n[actions_img]: https://github.com/FormidableLabs/react-fast-compare/actions/workflows/ci.yml/badge.svg\n[actions_site]: https://github.com/FormidableLabs/react-fast-compare/actions/workflows/ci.yml\n[npm_img]: https://img.shields.io/npm/v/react-fast-compare.svg\n[npm_site]: https://www.npmjs.com/package/react-fast-compare\n[downloads_img]: https://img.shields.io/npm/dm/react-fast-compare.svg\n[maintenance_img]: https://img.shields.io/badge/maintenance-active-green.svg\n","publish_time":1793920932735,"_cnpm_publish_time":1793920932735,"dist-tags":{"beta":"3.0.0-beta.1","latest":"3.2.4","next":"3.2.3-canary-20261105232110"}}