Last active
April 13, 2016 13:18
-
-
Save sonnyp/7ee94895b34db31e61a84e3b9802f76f to your computer and use it in GitHub Desktop.
JavaScript IIFE for Node.js and browsers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// global will refer to global for Node.js and window for browsers | |
;(function (global) { // ; in case the file is concatenated with a non ; line ending | |
'use strict' | |
// your code | |
}(typeof global !== 'undefined' ? global : this)) // `this`doesn't refer to global in Node.js module |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment