Use `module.exports` when in CommonJS environments instead of `window` global