AsyncIterator

Draft
This page is not complete.

The AsyncIterator global object is an abstract class providing helper methods, similar to the ones exposed on Array instances.

Constructor

AsyncIterator() 
A an abstract constructor that can only be invoked using a super() call.

Properties

AsyncIterator.prototype
The %AsyncIteratorPrototype% intrinsic object.

Methods

AsyncIterator.from() 
Equivalent to calling @@asyncIterator on the passed object.

AsyncIterator prototype

Prototype properties

AsyncIterator.prototype.constructor
Specifies the function that creates an object's prototype.
AsyncIterator.prototype[@@toStringTag] 
The string "Iterator".

Prototype methods

AsyncIterator.prototype.map() 
...
AsyncIterator.prototype.filter() 
...
AsyncIterator.prototype.take() 
...
AsyncIterator.prototype.drop() 
...
AsyncIterator.prototype.asIndexedPairs() 
...
AsyncIterator.prototype.flatMap() 
...
AsyncIterator.prototype.reduce() 
...
AsyncIterator.prototype.toArray() 
...
AsyncIterator.prototype.forEach() 
...
AsyncIterator.prototype.some() 
...
AsyncIterator.prototype.every() 
...
AsyncIterator.prototype.find() 
...
AsyncIterator.prototype[@@iterator]()
Returns this AsyncIterator instance.

Implementation methods

<implementation>.prototype.next()
Gets the next item in the AsyncIterator.
<implementation>.prototype.next()Optional
Returns the given value and finishes the iterator.
<implementation>.prototype.next()Optional
Throws an error to an iterator (also finishes the iterator, unless caught from within that iterator).

Specifications

Specification Status Comment
ESNext Iterator Helpers Proposal Stage 2 Draft Initial definition

Browser compatibility

No compatibility data found. Please contribute data for "javascript.builtins.AsyncIterator" (depth: 1) to the MDN compatibility data repository.

See also