Issue : Missing dependency in `light.js`
The light.js file uses window which is a Browser API so it is likely that the project uses a bundler or a dependency that polyfills window and makes it available on Node.js. However, there is no dependency on this listed, or a comment justifying this usage, meaning it could be an error. If this is not the case, then the check should be removed altogether for optimal performance.
Body:
The light.js file checks for the existence of window before requiring different modules. Because the check assumes that the code will always run in either a Node.js or browser environment it should be verified that window is polyfilled in Node.js environments, or remove the if statement altogether and add two separate files.