-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
The qs module has a lot of features but it takes up a lot of space in the resulting bundle.
According to Bundlephobia, qs and its dependencies (object-inspect, get-intrinsic) take up ~50% (~31 kB) of the final bundle: https://bundlephobia.com/package/superagent@10.2.3
Potential Alternatives
Adopting any of these options would reduce the final bundle size and dependency graph significantly.
picoquery
- 7.4 kB minified, 2.4 kB minified + gzipped (source)
- No dependencies
A barebones solution which is more spec-compliant and consistent with the URLSearchParams behavior but lacks the many of the more advanced features.
Using v1 would be necessary based superagent's current Node version and module requirements but the author is backporting fixes from later versions.
neoqs
- 13.9 kB minified, 4.7 kB minified + gzipped (source)
- No dependencies
A drop-in replacement for qs with a much smaller footprint. This would be the best option if backwards compatibility is a higher priority than spec compliance.