catamphetamine / libphonenumber-js

A simpler (and smaller) rewrite of Google Android's libphonenumber library in javascript
https://catamphetamine.gitlab.io/libphonenumber-js/
MIT License
2.81k stars 216 forks source link

Not really honest size comparison #346

Closed grantila closed 5 years ago

grantila commented 5 years ago

Google's libphonenumber can be compiled to a lot smaller than 500k+. My version (awesome-phonenumber) is:

$ yarn add awesome-phonenumber
$ du -hs node_modules
284K    node_modules

This library depends on minimist and xml2js which makes libphonenumber-js become pretty big:

$ yarn add libphonenumber-js
$ du -hs node_modules
7,1M    node_modules

So awesome-phonenumber is 25x smaller than this library.

catamphetamine commented 5 years ago

Hi. Your comparison is not valid because libphonenumber-js doesn't bundle neither minimist nor xml2js. Those two dependencies are used in the "generate custom metadata" command-line utility supplied as part of this package. Perhaps that command-line utility could be presented by some separate libphonenumber-js-cli package but historically it's part of the libphonenumber-js package and it's not included in the bundle.