Updated Functions (markdown)

Namhyeon Go 2024-08-07 11:59:40 +09:00
parent 4b11a5b238
commit cd2af846a4

@ -2,7 +2,7 @@
## AsyncFunction
JScript does not support the `async` keyword. So, WelsonJS uses the `AsyncFunction` class made by itself.
JScript does not support the `async` and `Generator` keywords. So, WelsonJS uses the `AsyncFunction`, `GeneratorFunction` class made by itself.
### Examples
@ -53,6 +53,19 @@ exports.onShoutcut = onShoutcut;
exports.sub_01 = sub_01;
```
## GeneratorFunction
```js
var a = new GeneratorFunction(function(_yield) {
_yield("a");
_yield("b");
_yield("c");
});
console.log(a.next().value);
console.log(a.next().value);
console.log(a.next().value);
```
## Contact me
- abuse@catswords.net
- ActivityPub [@catswords_oss@catswords.social](https://catswords.social/@catswords_oss)