mirror of
https://github.com/flynx/types.js.git
synced 2025-12-19 09:51:40 +00:00
added AsyncGenerator.prototype.flat(..)...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
41c2ad5e4d
commit
81324a5fc6
@ -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 },
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user