mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-07-11 19:23:10 +00:00
Updated AsyncFunction (markdown)
parent
021b73a962
commit
a66272689b
|
@ -25,7 +25,7 @@ exports.main = main;
|
||||||
```js
|
```js
|
||||||
var STD = require("lib/std");
|
var STD = require("lib/std");
|
||||||
|
|
||||||
function main(args) {
|
function onShoutcut(args) {
|
||||||
[5, 4, 3, 2, 1].forEach(function(x) {
|
[5, 4, 3, 2, 1].forEach(function(x) {
|
||||||
new AsyncFunction('sub_01', 'mymodule').run(x);
|
new AsyncFunction('sub_01', 'mymodule').run(x);
|
||||||
});
|
});
|
||||||
|
@ -38,6 +38,13 @@ function _async_sub_01(args) {
|
||||||
console.log(x);
|
console.log(x);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function main(args) {
|
||||||
|
if (!AsyncFunction.bind(exports, args) {
|
||||||
|
onShoutcut(args);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
exports.main = main;
|
exports.main = main;
|
||||||
|
exprts.onShoutcut = onShoutcut;
|
||||||
exports._async_sub_01 = _async_sub_01;
|
exports._async_sub_01 = _async_sub_01;
|
||||||
```
|
```
|
Loading…
Reference in New Issue
Block a user