Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "iter/shift/docs/types/index.d"

Index

Type aliases

Functions

Type aliases

Callback

Callback: (value?: any) => any

Callback invoked with the skipped value.

param

iterated value

Type declaration

    • (value?: any): any
    • Parameters

      • Optional value: any

      Returns any

Iterator

Iterator: Iter | IterableIterator

Functions

Export assignment iterShift

  • Returns an iterator which skips the first value of a provided iterator.

    Notes

    • If an environment supports Symbol.iterator and a provided iterator is iterable, the returned iterator is iterable.

    Parameters

    • iterator: Iterator

      input iterator

    • Optional clbk: Callback

      callback to invoke with the skipped value

    • Optional thisArg: any

      callback execution context

    Returns Iterator

    iterator

    Example

    var array2iterator = require( `@stdlib/array/to-iterator` );
    
    var iter = iterShift( array2iterator( [ 1, 2 ] ) );
    
    var v = iter.next().value;
    // returns 2
    
    var bool = iter.next().done;
    // returns true