I get the objective of doing what you did, I'm just trying to warn that people might be gunning their foot since they are less proficient in code and might do something like:
import Number from 'some-number-utils'; window.Number = Number;
And from here on they're overriding the Number global function and their app might not work as expected due to this override.
Number
Maybe advise to wrap the global variable in __ like window.__<name>__ ?
__
window.__<name>__
I'm not against what you did, I'm just trying to warn for possible side effects.
Totally agree. Maybe some variable identifier is good idea. Thanks will update in post as well
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I get the objective of doing what you did, I'm just trying to warn that people might be gunning their foot since they are less proficient in code and might do something like:
And from here on they're overriding the
Number
global function and their app might not work as expected due to this override.Maybe advise to wrap the global variable in
__
likewindow.__<name>__
?I'm not against what you did, I'm just trying to warn for possible side effects.
Totally agree. Maybe some variable identifier is good idea. Thanks will update in post as well