The import of i18n-iso-countries contains far more data (including country names for many many languages) than actually needed by the ISIN validator.
For the most use cases, I think this bloats the bundle size significantly and unnecessarily.
On the other hand, I understand that country codes shouldn't be hardcoded in this package since the underlying ISO dataset still changes occasionally.
But I think there would be ways to get both, a smaller bundle size and up-to-dateness, e.g. by preprocessing at build time.
@michaelwittig, how does that sound to you; would you accept an MR that turns the dependency into a devDependency, extracts only a small array or RegEx from it at build time, and pulls that into the ISIN validator instead of the whole ISO library?
The import of
i18n-iso-countries
contains far more data (including country names for many many languages) than actually needed by the ISIN validator.For the most use cases, I think this bloats the bundle size significantly and unnecessarily.
On the other hand, I understand that country codes shouldn't be hardcoded in this package since the underlying ISO dataset still changes occasionally.
But I think there would be ways to get both, a smaller bundle size and up-to-dateness, e.g. by preprocessing at build time.
@michaelwittig, how does that sound to you; would you accept an MR that turns the dependency into a devDependency, extracts only a small array or RegEx from it at build time, and pulls that into the ISIN validator instead of the whole ISO library?