1.2.0 • Published 2 years ago

publish_own_module v1.2.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

// if pattern

// pass param this to context // pass function to definition //fixed param to have API from definition execution (function (context, modName, definition) { //context ===> represent window object //if node // global object // module // module.exports

// check within node or not if (typeof module != "undefined" && module.exports) { module.exports = definition(); }

//if window // window objec else { // window object represented with context contextmodName = definition(); }

t; })(this, "TestIFPattern", function () { // API Implementation });

// if pattern take 2 param // 1- this to refer global object // in node ==> global // in browser ==> window

// 2- fuction have Implementation of API & return API

// 3- fixed param to have API from definition execution