Options
All
  • Public
  • Public/Protected
  • All
Menu

An AsyncIterator that emits a range of items from a source array.

Accepts a start and stop index and a step of +1 or -1

Type parameters

  • T

Hierarchy

Index

Constructors

constructor

  • new ArrayViewIterator(source: T[], startIndex: number, stopIndex: number, step: -1 | 1): ArrayViewIterator

Properties

Optional _destination

_destination: AsyncIterator<any>

_readable

_readable: boolean

_state

_state: number

closed

closed: boolean

ended

ended: boolean

readable

readable: boolean

Static CLOSED

CLOSED: 3

Static CLOSING

CLOSING: 2

Static ENDED

ENDED: 4

Static INIT

INIT: 0

Static OPEN

OPEN: 1

Static STATES

STATES: ["INIT", "OPEN", "CLOSING", "CLOSED", "ENDED"]

Static defaultMaxListeners

defaultMaxListeners: number

Methods

_changeState

  • _changeState(newState: number, eventAsync?: boolean): void

_end

  • _end(): void

_toStringDetails

  • _toStringDetails(): string

addListener

  • addListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

append

clone

close

  • close(): void

copyProperties

  • copyProperties(source: AsyncIterator<any>, propertyNames: string[]): void

each

  • each(callback: function, self?: any): void

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

eventNames

  • eventNames(): Array<string | symbol>
  • Returns Array<string | symbol>

filter

getMaxListeners

  • getMaxListeners(): number
  • Returns number

getProperties

  • getProperties(): object

getProperty

  • getProperty(propertyName: string, callback?: function): any

listenerCount

  • listenerCount(type: string | symbol): number
  • Parameters

    • type: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

map

off

  • off(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

on

  • on(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

once

  • once(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

prepend

prependListener

  • prependListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

range

rawListeners

  • rawListeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

read

  • read(): T

removeAllListeners

  • removeAllListeners(event?: string | symbol): this
  • Parameters

    • Optional event: string | symbol

    Returns this

removeListener

  • removeListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

setMaxListeners

  • setMaxListeners(n: number): this
  • Parameters

    • n: number

    Returns this

setProperties

  • setProperties(properties: object): void

setProperty

  • setProperty(propertyName: string, value: any): void

skip

surround

take

toString

  • toString(): string

transform

Static listenerCount

  • listenerCount(emitter: EventEmitter, event: string | symbol): number
  • deprecated

    since v4.0.0

    Parameters

    • emitter: EventEmitter
    • event: string | symbol

    Returns number

Static range

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc