Skip to content

Instantly share code, notes, and snippets.

@lopugit
Created February 20, 2019 12:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lopugit/87874218f9a8c4dfaf2bfbc326b0a342 to your computer and use it in GitHub Desktop.
Save lopugit/87874218f9a8c4dfaf2bfbc326b0a342 to your computer and use it in GitHub Desktop.
bugs global factory
(function (globalThis, factory) {
if (typeof exports === 'object' && typeof module !== 'undefined')
if (typeof global === 'object')
return factory(global)
else
return factory(exports)
if (typeof define === 'function' && define.amd)
return define(['exports'], factory)
factory(globalThis.window = globalThis.window || {})
}(this, function(exports) {
// exports refers either to global, exports, or window
}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment