Converts most objects that can be an Iterator into one. The supported inputs are:
An Iterator, will return the input as is/unchanged.
An Iterable, will return the input with it's Symbol.iterator property called. So this includes any object that
has a Symbol.iterator property. Like Arrays, Strings, Maps, Sets, etc.
Any function with an optional sentinel argument, will return a FunctionIterator. This iterator will call the
input func once per next() call and will stop once the value of sentinel (default: undefined) is returned from
func.
Any other non-nullable object, will return an ObjectIterator that iterates over the input object's own properties
deeply.
Converts most objects that can be an
Iteratorinto one. The supported inputs are:Iterator, will return the input as is/unchanged.Iterable, will return the input with it'sSymbol.iteratorproperty called. So this includes any object that has aSymbol.iteratorproperty. Like Arrays, Strings, Maps, Sets, etc.functionwith an optionalsentinelargument, will return aFunctionIterator. This iterator will call the inputfunconce pernext()call and will stop once the value ofsentinel(default: undefined) is returned fromfunc.