Skip to content

Instantly share code, notes, and snippets.

@zmmbreeze
Created November 12, 2013 03:23
Show Gist options
  • Save zmmbreeze/7424946 to your computer and use it in GitHub Desktop.
Save zmmbreeze/7424946 to your computer and use it in GitHub Desktop.
module & define
if (typeof module === 'object' && module && typeof module.exports === 'object') {
// Node.js module pattern
module.exports = jQuery;
} else {
// AMD
if (typeof define === 'function' && define.amd) {
define('jquery-onscreen', [], function() { return jQuery; });
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment