From a66272689b2e29ce5fe6b7f3b0ba7e01248d207e Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Sun, 5 Jun 2022 20:05:27 +0900 Subject: [PATCH] Updated AsyncFunction (markdown) --- AsyncFunction.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/AsyncFunction.md b/AsyncFunction.md index 50281a1..a165f10 100644 --- a/AsyncFunction.md +++ b/AsyncFunction.md @@ -25,7 +25,7 @@ exports.main = main; ```js var STD = require("lib/std"); -function main(args) { +function onShoutcut(args) { [5, 4, 3, 2, 1].forEach(function(x) { new AsyncFunction('sub_01', 'mymodule').run(x); }); @@ -38,6 +38,13 @@ function _async_sub_01(args) { console.log(x); } +function main(args) { + if (!AsyncFunction.bind(exports, args) { + onShoutcut(args); + } +} + exports.main = main; +exprts.onShoutcut = onShoutcut; exports._async_sub_01 = _async_sub_01; ``` \ No newline at end of file