[JavaScript]UMD模块
作者:互联网
(function umd(root, factory) { if (typeof module === 'object' && typeof exports === 'object') module.exports = factory() else if (typeof define === 'function' && define.amd) define([], factory) else root.CustomFuc = factory() })(this, function factory() { var CustomFuc = {}; return CustomFuc; });
标签:function,exports,JavaScript,CustomFuc,factory,UMD,typeof,模块,define 来源: https://www.cnblogs.com/SoYang/p/15119656.html