Hi there! Your project's been pretty helpful, so thanks for making it.
I was wondering if you'd consider replacing your throw new Error() statements with a less generic error, ideally a custom one for this project. That way it's much easier to specifically target these errors in any code making use of this project.
This would for example come in handy when you're batch processing a large number of addresses, and want to log the ones that weren't successfully formatted. While you can currently specify a fallback country code, you wouldn't know whether the fallback was used to format the address or not.
Hi there! Your project's been pretty helpful, so thanks for making it.
I was wondering if you'd consider replacing your
throw new Error()statements with a less generic error, ideally a custom one for this project. That way it's much easier to specifically target these errors in any code making use of this project.This would for example come in handy when you're batch processing a large number of addresses, and want to log the ones that weren't successfully formatted. While you can currently specify a fallback country code, you wouldn't know whether the fallback was used to format the address or not.