JSIterator<T extends JSAny?>
extension type
A proper JS iterator.
In JS, a "proper iterator" implements the JS iterator protocol and is an
instance of the JS Iterator class.
This library provides no type for the JS Iterator type without the JS
iterator protocol members. Such an object is not useful.
- on
- Implemented types
-
- JSIteratorProtocol<
T> - JSIterable<
T>
- JSIteratorProtocol<
- Available extensions
- @JS('Iterator')
- @Since.new('3.12')
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isDefinedAndNotNull → bool
-
Available on JSAny?, provided by the NullableUndefineableJSAnyExtension extension
no setter - isNull → bool
-
Available on JSAny?, provided by the NullableUndefineableJSAnyExtension extension
Whether this value corresponds to JavaScriptnull.no setter - isTruthy → JSBoolean
-
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of!!in JavaScript.thisno setter - isUndefined → bool
-
Available on JSAny?, provided by the NullableUndefineableJSAnyExtension extension
Whether this value corresponds to JavaScriptundefined.no setter - isUndefinedOrNull → bool
-
Available on JSAny?, provided by the NullableUndefineableJSAnyExtension extension
no setter -
iterator
→ JSIterator<
T> -
See
[Symbol.iterator]().no setterinherited - not → JSBoolean
-
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of!in JavaScript.thisno setter -
returnValue
→ JSIteratorResult<
T> Function([T? value])? -
See
return().no setterinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
throwError
→ JSIteratorResult<
T> Function([JSAny? error])? -
See
throw().no setterinherited -
toDartIterable
→ Iterable<
T> -
Available on JSIterable<
A Dart Iterable that iterates over the values in this.T> , provided by the JSIterableToIterable extensionno setter -
toDartIterator
→ Iterator<
T> -
Available on JSIterator<
A` Dart Iterator that iterates over the values in this.T> , provided by the JSIteratorToIterator extensionno setter
Methods
-
add(
JSAny? any) → JSAny -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result ofin JavaScript.this+any -
and(
JSAny? any) → JSAny? -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result ofin JavaScript.this&&any -
dartify(
) → Object? -
Available on JSAny?, provided by the JSAnyUtilityExtension extension
Converts a JavaScript JSON-like value to the Dart equivalent if possible. -
divide(
JSAny? any) → JSAny -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result ofin JavaScript.this/any -
drop(
int limit) → JSIterator< T> -
See
Iterator.drop(). -
equals(
JSAny? any) → JSBoolean -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result ofin JavaScript.this==any -
exponentiate(
JSAny? any) → JSAny -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result ofin JavaScript.this**any -
greaterThan(
JSAny? any) → JSBoolean -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result ofin JavaScript.this>any -
greaterThanOrEqualTo(
JSAny? any) → JSBoolean -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result ofin JavaScript.this>=any -
instanceof(
JSFunction constructor) → bool -
Available on JSAny?, provided by the JSAnyUtilityExtension extension
Whether thisJSAny?is aninstanceofconstructor. -
instanceOfString(
String constructorName) → bool -
Available on JSAny?, provided by the JSAnyUtilityExtension extension
Whether thisJSAny?is aninstanceofthe constructor that is defined byconstructorName, which is looked up in the globalContext. -
lessThan(
JSAny? any) → JSBoolean -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result ofin JavaScript.this<any -
lessThanOrEqualTo(
JSAny? any) → JSBoolean -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result ofin JavaScript.this<=any -
modulo(
JSAny? any) → JSAny -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result ofin JavaScript.this%any -
multiply(
JSAny? any) → JSAny -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result ofin JavaScript.this*any -
next(
[JSAny? yieldValue]) → JSIteratorResult< T> -
See
next().inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notEquals(
JSAny? any) → JSBoolean -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result ofin JavaScript.this!=any -
or(
JSAny? any) → JSAny? -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result ofin JavaScript.this||any -
strictEquals(
JSAny? any) → JSBoolean -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result ofin JavaScript.this===any -
strictNotEquals(
JSAny? any) → JSBoolean -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result ofin JavaScript.this!==any -
subtract(
JSAny? any) → JSAny -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result ofin JavaScript.this-any -
take(
int limit) → JSIterator< T> -
See
Iterator.take(). -
toString(
) → String -
A string representation of this object.
inherited
-
typeofEquals(
String typeString) → bool -
Available on JSAny?, provided by the JSAnyUtilityExtension extension
Whether the result oftypeofon thisJSAny?istypeString. -
unsignedRightShift(
JSAny? any) → JSNumber -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result ofin JavaScript.this>>>any
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
from<
T extends JSAny?> (JSIteratorProtocol< T> object) → JSIterator<T> - Converts an object that just implements the Iterator protocol into a proper iterator.
-
fromFunctions<
T extends JSAny?> (JSIteratorResult< T> next(), {JSIteratorResult<T> returnValue()?}) → JSIterator<T> - Creates a proper JSIterator from the methods defined by the Iterator protocol.
-
fromIterable<
T extends JSAny?> (JSIterableProtocol< T> object) → JSIterator<T> - Creates a proper iterator from an object that just implements the Iterable protocol.