{"name":"react-fast-compare","version":"3.0.0-beta.1","description":"Fastest deep equal comparison for React. Perfect for shouldComponentUpdate. Also really fast general-purpose deep comparison","main":"index.js","scripts":{"preversion":"yarn test","benchmark":"node benchmark","eslint":"eslint \"*.js\" benchmark test","test-browser":"karma start test/browser/karma.conf.js","test-browser-ie":"karma start test/browser/karma.conf.ie.js","test-node":"mocha \"test/node/*.spec.js\"","test-node-cov":"nyc yarn test-node","test-ts":"tsc --target ES5 --noImplicitAny index.d.ts","test":"builder concurrent --buffer eslint test-ts test-node-cov test-browser","test-ie":"builder concurrent --buffer eslint test-ts test-node-cov test-browser-ie","compress":"terser --compress --mangle=\"toplevel:true\" -- index.js","size-min-gz":"yarn -s compress | gzip -9 | wc -c"},"repository":{"type":"git","url":"git+https://github.com/FormidableLabs/react-fast-compare.git"},"keywords":["fast","equal","react","compare","shouldComponentUpdate","deep-equal"],"author":{"name":"Chris Bolin"},"license":"MIT","bugs":{"url":"https://github.com/FormidableLabs/react-fast-compare/issues"},"homepage":"https://github.com/FormidableLabs/react-fast-compare","devDependencies":{"@babel/core":"^7.7.5","@babel/preset-env":"^7.7.6","babel-loader":"^8.0.6","benchmark":"^2.1.4","builder":"^5.0.0","core-js":"^3.5.0","coveralls":"^3.0.9","eslint":"^6.7.2","fast-deep-equal":"3.1.1","fast-deep-equal-git":"github:epoberezkin/fast-deep-equal#v3.1.1","karma":"^4.4.1","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^1.1.0","karma-ie-launcher":"^1.0.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-safari-launcher":"^1.0.0","karma-webpack":"^4.0.2","lodash":"^4.17.10","mocha":"^6.2.2","nano-equal":"^2.0.2","nyc":"^14.1.1","react":"^16.3.1","react-test-renderer":"^16.3.1","shallow-equal-fuzzy":"0.0.2","sinon":"^7.5.0","terser":"^4.4.3","typescript":"^3.7.3","webpack":"^4.5.0"},"nyc":{"exclude":["**/test/**","node_modules"],"reporter":["lcov","text-summary"]},"types":"index.d.ts","readme":"# react-fast-compare\n\n[![Downloads][downloads_img]][npm_site]\n[![size_minzip][size_minzip]][size_site]\n[![Travis Status][trav_img]][trav_site]\n[![AppVeyor Status][appveyor_img]][appveyor_site]\n[![npm version][npm_img]][npm_site]\n[![Maintenance Status][maintenance-image]](#maintenance-status)\n\nThe fastest deep equal comparison for React. Really fast general-purpose deep comparison.\nGreat for `shouldComponentUpdate`. This 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![benchmark chart](assets/benchmarking.png \"benchmarking chart\")\n\n(Check out the [benchmarking details](#benchmarking-this-library).)\n\n## Install\n\n```sh\n$ yarn add react-fast-compare\n# or\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 Date and RegExp objects\n- should 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 700 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 usage\nclass ExpensiveRenderer extends React.Component {\n  shouldComponentUpdate(nextProps) {\n    return !isEqual(this.props, nextProps);\n  }\n  render() {\n    // ...\n  }\n}\n```\n\n## Do I Need `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's `shouldComponentUpdate` should not be used blindly.\nFirst, see if a\n[PureComponent](https://reactjs.org/docs/react-api.html#reactpurecomponent)\nwould work for you. If it won't (if you need deep checks), it's wise to make\nsure you've correctly indentified the bottleneck in your application by\n[profiling the performance](https://reactjs.org/docs/optimizing-performance.html#profiling-components-with-the-chrome-performance-tab).\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! For more information about making your app faster, check out the\n[Optimizing Performance](https://reactjs.org/docs/optimizing-performance.html)\nsection of the React docs.\n\n## Benchmarking this Library\n\nAll tests carried out locally on a MacBook. The absolute values are much less\nimportant than the relative differences between packages.\n\nBenchmarking source can be found\n[here](https://github.com/FormidableLabs/react-fast-compare/blob/master/benchmark/index.js).\nEach \"operation\" consists of running all relevant tests. The React benchmark\nuses both the generic tests and the react tests; these runs will be slower\nsimply because there are more tests in each operation.\n\n### Generic Data\n\n```\nreact-fast-compare x 157,863 ops/sec ±0.54% (94 runs sampled)\nfast-deep-equal x 149,877 ops/sec ±0.76% (93 runs sampled)\nlodash.isEqual x 33,298 ops/sec ±0.70% (93 runs sampled)\nnano-equal x 144,836 ops/sec ±0.51% (94 runs sampled)\nshallow-equal-fuzzy x 110,192 ops/sec ±0.57% (95 runs sampled)\n  fastest: react-fast-compare\n```\n\n`react-fast-compare` and `fast-deep-equal` should be the same speed for these\ntests; any difference is just noise. `react-fast-compare` won't be faster than\n`fast-deep-equal`, because it's based on it.\n\n### React and Generic Data\n\n```\nreact-fast-compare x 64,102 ops/sec ±0.36% (94 runs sampled)\nfast-deep-equal x 63,844 ops/sec ±0.43% (94 runs sampled)\nlodash.isEqual x 6,243 ops/sec ±0.72% (90 runs sampled)\n  fastest: react-fast-compare,fast-deep-equal\n```\n\nTwo of these packages cannot handle comparing React elements, because they\ncontain circular reference: `nano-equal` and `shallow-equal-fuzzy`.\n\n### Running Benchmarks\n\n```sh\n$ yarn install\n$ yarn run benchmark\n```\n\n## fast-deep-equal Versioning\n\nreact-fast-compare@3 tracks fast-deep-equal@3.1.1\n\nNow that `fast-deep-equal` has separate es5, es6, and es6 + React entry points, the main differences with this library are:\n\n- `try/catch` guardrails for stack overflows from undetected circular references.\n- A single unified entry point for **all** uses. No matter what your target application is, `import equal from 'react-fast-compare'` just works.\n\n## License\n\n[MIT](https://github.com/FormidableLabs/react-fast-compare/blob/readme/LICENSE)\n\n## Contributing\n\nPlease see our [contributions guide](./CONTRIBUTING.md).\n\n## Maintenance Status\n\n**Active:** Formidable is actively working on this project, and we expect to continue for work for the foreseeable future. Bug reports, feature requests and pull requests are welcome.\n\n[trav_img]: https://api.travis-ci.com/FormidableLabs/react-fast-compare.svg\n[trav_site]: https://travis-ci.com/FormidableLabs/react-fast-compare\n[cov_img]: https://img.shields.io/coveralls/FormidableLabs/react-fast-compare.svg\n[cov_site]: https://coveralls.io/r/FormidableLabs/react-fast-compare\n[npm_img]: https://badge.fury.io/js/react-fast-compare.svg\n[npm_site]: http://badge.fury.io/js/react-fast-compare\n[appveyor_img]: https://ci.appveyor.com/api/projects/status/github/formidablelabs/react-fast-compare?branch=master&svg=true\n[appveyor_site]: https://ci.appveyor.com/project/FormidableLabs/react-fast-compare\n[size_min]: https://img.shields.io/bundlephobia/min/react-fast-compare.svg\n[size_minzip]: https://img.shields.io/bundlephobia/minzip/react-fast-compare.svg\n[size_site]: https://bundlephobia.com/result?p=react-fast-compare\n[downloads_img]: https://img.shields.io/npm/dt/react-fast-compare.svg\n[maintenance-image]: https://img.shields.io/badge/maintenance-active-green.svg\n","readmeFilename":"README.md","gitHead":"61b9ec59b9d50cb20b28fbee62b2f8535f9eb3a2","_id":"react-fast-compare@3.0.0-beta.1","_nodeVersion":"12.13.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-rlsbTJvnLzroRgmlEq3BzmcMUplCPezrZM8jwGmBdki9mITj6R7LOPOe7ZVI9VXgSJTuKcwrEKpl9rwGrXJ2Ww==","shasum":"0d20cb1971ea4b6c3929fb456a4bf814b8fb24cc","tarball":"http://registry-npm.ywwl.com/react-fast-compare/download/react-fast-compare-3.0.0-beta.1.tgz","fileCount":6,"unpackedSize":15695,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeNIBVCRA9TVsSAnZWagAAv0gQAIWouI5eIi7H4b5OTvKh\nEsDdv/Ze8pBj64kRewyS3eT0WwPpEsCfxJdRqe8DpVtrpiprL+w9vh2oZX4Q\n7SUVeA+VYKwHA4HUfTCuklOfNj9L5GbEpQV6VZEuwhdFtNiimxwF8V5UgVT6\ntcqkNWDn7E8RQ2BTDcoflLIE69nLKm2kJqJTWgNfoHdA3RZXrPXvQs44gWXE\njDURlSpgpu/lwqPqeWRVEyyJ7RtahtpmL5jxMaZ4pI5ZLKbzNN3RawB19U26\ntd7BI9ZNJ/4xzMRKvz1XKtHk3RG0wf7jSjS05yZAKwM33L3NrtHlWtsqyOxv\nf9ArAJ+RgU/6sogm9kY/3iVmGo9XfL9rmI0sYM3B90UG8EKt045YjleaNbHK\nmvGg8lqONVq+F1Ots2WUPn0Q3B3hkhTDftszYrvzjZ0DVZ5B9jzm0HSmpwYt\n95t8Tyk7L9kWGrwyylYWpxuUXzx3BuihNqjdKF43JzuGGj42rJDde8nE9RaX\nJWCAaT+LvUliAU9R2QyYSITly+1I9FoBvJpzopVYnu3QxiGBsmuueJlloMKm\n63IYv2+VGwT1DshPonqYvXrZZfG7+AmyfKOLNPWKpIYhl33ASaUtC3cvtncM\nJgfS6aKCUCzIznM7eEgXJE0nsNObjA+EJBWBlZTRUAND5OtPB6vt/4NOqecc\nLMxH\r\n=dkyD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC65PXUya6+bXTypn1kGrRdD8zgqvP3DMTTGMnjDN8VhQIhAJCPTFzoJytesVMTUhqHgpG+Oa1uHCAHhPbzOAT4n0cQ"}],"size":6106,"noattachment":false,"key":"/react-fast-compare/-/react-fast-compare-3.0.0-beta.1.tgz"},"maintainers":[{"email":"andy.john.richardson@gmail.com","name":"andyrichardson"},{"email":"spoonart@gmail.com","name":"bmathews"},{"email":"lauren.eastridge@formidable.com","name":"boygirl"},{"email":"me@carlos.dev","name":"carlospaelinck"},{"email":"bolin.chris@gmail.com","name":"chrisbolin"},{"email":"per@sproutlab.com","name":"coopy"},{"email":"ryan@eastridge.me","name":"eastridge"},{"email":"emma.brillhart@gmail.com","name":"ebrillhart"},{"email":"exogen@gmail.com","name":"exogen"},{"email":"admin@formidablelabs.com","name":"formidable-owner"},{"email":"imranolas@gmail.com","name":"imranolas"},{"email":"jrwilson@gmail.com","name":"jason.wilson"},{"email":"kylieastewart@gmail.com","name":"kale-stew"},{"email":"kara.stubbs@formidable.com","name":"kiraarghy"},{"email":"jen.luker@formidable.com","name":"knitcodemonkey"},{"email":"kyle@kylecesmat.com","name":"kylecesmat"},{"email":"mariano.martinez@formidable.com","name":"mariano-formidable"},{"email":"mhink1103@gmail.com","name":"mhink"},{"email":"michael@michaelmerrill.me","name":"michaelmerrill"},{"email":"parker.ziegler@formidable.com","name":"parkerziegler"},{"email":"lavalle.paula@gmail.com","name":"paulathevalley"},{"email":"phil@kitten.sh","name":"philpl"},{"email":"ryan@loose-bits.com","name":"ryan.roemer"},{"email":"ryanrray@gmail.com","name":"ryanisinallofus"},{"email":"samuelestrella226@gmail.com","name":"samwhale"},{"email":"sarahmichellemeyer@gmail.com","name":"sarmeyer"},{"email":"huynh.stefan@gmail.com","name":"stefvhuynh"},{"email":"ken_wheeler@me.com","name":"thekenwheeler"},{"email":"tyler@tylerpaulthompson.com","name":"tptee"}],"_npmUser":{"name":"chrisbolin","email":"bolin.chris@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-fast-compare_3.0.0-beta.1_1580499029223_0.5191267205166679"},"_hasShrinkwrap":false,"publish_time":1580499029345,"_cnpm_publish_time":1580499029345,"dist-tags":{"beta":"3.0.0-beta.1","latest":"3.2.4","next":"3.2.3-canary-20261105232110"}}