cjs amd iifs

 

 

;(function (global, factory) {

if (typeof define === 'function' && define.amd) {

define(function () {

return factory(global);

});

} else if (typeof module !== 'undefined' && module.exports) {

module.exports = factory(global);

} else {

global.func = factory(global);

}

}(typeof window !== 'undefined' ? window : this, function (window) {

    .........

}))

 

你可能感兴趣的:(javascript)