us-state-codes icon indicating copy to clipboard operation
us-state-codes copied to clipboard

Replace lodash dependencies with native code

Open andrew-pyle opened this issue 3 years ago • 0 comments

I would like to use this library on the front-end for parsing USA State abreviations & names, but the 5.5kB (minified & gzipped) size is too large to justify the inclusion.

This PR removes all 3rd party dependencies and replaces them with Javascript built-in functions. ~92% of the npm package's size was from lodash dependencies.

Analysis from https://bundlephobia.com/package/[email protected].

All tests passed locally, so I do not believe I've made any inappropriate assumptions about the library's data types.

andrew-pyle avatar Nov 17 '21 23:11 andrew-pyle