Home Manual Reference Source

Function

Static Public Summary
public

next(iterator: Iterator, dflt: any): any

Returns the next value of the input iterator.

Static Private Summary
private

_next(iterator: Iterator): {value: any, done?: boolean}

Returns the next event of the input iterator.

Static Public

public next(iterator: Iterator, dflt: any): any source

Returns the next value of the input iterator. If the iterator is exhausted, throws a StopIteration, unless a dflt argument has been specified, in which case the dflt argument is returned.

Params:

NameTypeAttributeDescription
iterator Iterator

The input iterator.

dflt any
  • optional
  • default: undefined

The default value to return in the case that the input iterator is exhausted.

Return:

any

The next value of the input iterator.

Static Private

private _next(iterator: Iterator): {value: any, done?: boolean} source

Returns the next event of the input iterator.

Params:

NameTypeAttributeDescription
iterator Iterator

The input iterator.

Return:

{value: any, done?: boolean}