added AsyncGenerator.prototype.flat(..)...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2022-06-21 07:49:03 +03:00
parent 41c2ad5e4d
commit 81324a5fc6

View File

@ -510,6 +510,13 @@ object.Mixin('AsyncGeneratorProtoMixin', 'soft', {
return [] })
return state },
flat: async function*(){
for await(var e of this){
if(e instanceof Array){
yield* e
} else {
yield e }}},
concat: async function*(other){
yield* this
yield* other },