The performance would be better by not running those checks
Is it possible to have something similar in Globalize ?
If yes, I'm willing to do a POC Pull Request
Edit :
I know there is a runtime version already, but not everybody can use the production generator to be able to use only the Globalize Runtime, Anyway, these changes would also benefit the runtime version
There are a lot of checks all over the place for example :
Are they useful in production ?
In the source code of React, there are a lot of checks but they are enabled only in development mode :
For example : https://github.com/facebook/react/blob/master/packages/react-dom/src/client/ReactDOM.js#L1053-L1055
And they change this variable when building : https://github.com/facebook/react/blob/master/scripts/rollup/build.js#L234 They even have babel plugins to automatically wrap some functions with this
if (__DEV__) {}
condition : https://github.com/facebook/react/blob/master/scripts/rollup/build.js#L88-L91This could have two advantages :
Is it possible to have something similar in Globalize ?
If yes, I'm willing to do a POC Pull Request
Edit : I know there is a runtime version already, but not everybody can use the production generator to be able to use only the Globalize Runtime, Anyway, these changes would also benefit the runtime version