Closed zengfenfei closed 9 years ago
Hello @zengfenfei,
To define a function-module, you must use a factory function (a.k.a. "definition function"):
define(['dep1', 'dep2', 'dep3' /* etc */], function (dep1, dep2, dep3) {
// do preparation work here
return function () {
// this is your function-module
};
});
If you look further down in the README.md, there are other examples of function-modules.
I'm closing this issue, but feel free to continue the conversation. :)
-- John
As the doc says above, if the module is a function then the module value is the function itself or the return value of function?