Skip to content

Commit 3a99879

Browse files
authored
Bundle Size (#60)
* update to flatgreen badge * add Bundle size note * swap bundlephobia for custom size * update package description * move to monthly download badge
1 parent 1210a90 commit 3a99879

2 files changed

Lines changed: 14 additions & 8 deletions

File tree

README.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# react-fast-compare
22

33
[![Downloads][downloads_img]][npm_site]
4-
[![size_minzip][size_minzip]][size_site]
4+
[![Bundle Size][bundle_img]](#bundle-size)
55
[![Travis Status][trav_img]][trav_site]
66
[![AppVeyor Status][appveyor_img]][appveyor_site]
77
[![npm version][npm_img]][npm_site]
8-
[![Maintenance Status][maintenance-image]](#maintenance-status)
8+
[![Maintenance Status][maintenance_img]](#maintenance-status)
99

1010
The fastest deep equal comparison for React. Very quick general-purpose deep
1111
comparison, too. Great for `React.memo` and `shouldComponentUpdate`.
@@ -132,6 +132,14 @@ $ yarn run benchmark
132132

133133
This version of `react-fast-compare` tracks `fast-deep-equal@3.1.1`.
134134

135+
## Bundle Size
136+
137+
There are a variety of ways to calculate bundle size for JavaScript code.
138+
You can see our size test code in the `compress` script in
139+
[`package.json`](https://github.com/FormidableLabs/react-fast-compare/blob/master/package.json).
140+
[Bundlephobia's calculation](https://bundlephobia.com/result?p=react-fast-compare) is slightly higher,
141+
as they [do not mangle during minification](https://github.com/pastelsky/package-build-stats/blob/v6.1.1/src/getDependencySizeTree.js#L139).
142+
135143
## License
136144

137145
[MIT](https://github.com/FormidableLabs/react-fast-compare/blob/readme/LICENSE)
@@ -152,8 +160,6 @@ Please see our [contributions guide](./CONTRIBUTING.md).
152160
[npm_site]: http://badge.fury.io/js/react-fast-compare
153161
[appveyor_img]: https://ci.appveyor.com/api/projects/status/github/formidablelabs/react-fast-compare?branch=master&svg=true
154162
[appveyor_site]: https://ci.appveyor.com/project/FormidableLabs/react-fast-compare
155-
[size_min]: https://img.shields.io/bundlephobia/min/react-fast-compare.svg
156-
[size_minzip]: https://img.shields.io/bundlephobia/minzip/react-fast-compare.svg
157-
[size_site]: https://bundlephobia.com/result?p=react-fast-compare
158-
[downloads_img]: https://img.shields.io/npm/dt/react-fast-compare.svg
159-
[maintenance-image]: https://img.shields.io/badge/maintenance-active-green.svg
163+
[bundle_img]: https://img.shields.io/badge/minzipped%20size-622%20B-flatgreen.svg
164+
[downloads_img]: https://img.shields.io/npm/dm/react-fast-compare.svg
165+
[maintenance_img]: https://img.shields.io/badge/maintenance-active-flatgreen.svg

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "react-fast-compare",
33
"version": "3.0.0-beta.1",
4-
"description": "Fastest deep equal comparison for React. Perfect for shouldComponentUpdate. Also really fast general-purpose deep comparison",
4+
"description": "Fastest deep equal comparison for React. Great for React.memo & shouldComponentUpdate. Also really fast general-purpose deep comparison.",
55
"main": "index.js",
66
"scripts": {
77
"preversion": "yarn test",

0 commit comments

Comments
 (0)