Created
May 10, 2017 03:31
-
-
Save rockydd/6db4a241f7d516d170c5a4c0031af2c7 to your computer and use it in GitHub Desktop.
UMD
This file contains 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
(function (root, factory) { | |
if (typeof define === 'function' && define.amd) { | |
// AMD | |
define(['jquery'], factory); | |
} else if (typeof exports === 'object') { | |
// Node, CommonJS-like | |
module.exports = factory(require('jquery')); | |
} else { | |
// Browser globals (root is window) | |
root.returnExports = factory(root.jQuery); | |
} | |
}(this, function ($) { | |
// methods | |
function myFunc(){}; | |
// exposed public method | |
return myFunc; | |
})); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment