It's a best practice for npm packages to not pollute the global namespace. In particular, plenty of other modules use a rough check on window to tell if it's a nodejs environment or not, and this line invalidates the check.
Would you mind updating the package with this fix?
window
anddocument
are declared without thevar
keyword:https://github.com/KyleAMathews/element-resize-event/blob/master/index.js#L2
This has an equivalent effect to this line:
It's a best practice for npm packages to not pollute the global namespace. In particular, plenty of other modules use a rough check on
window
to tell if it's a nodejs environment or not, and this line invalidates the check.Would you mind updating the package with this fix?