Methods
[iterator]
- [iterator](): Generator<T, void, unknown>
Returns Generator<T, void, unknown>
forEach
- forEach(fn, thisp?): void
Parameters
- fn: ((value, i, list) => any)
- (value, i, list): any
Returns any
Optional
thisp: any
Returns void
forEachReverse
- forEachReverse(fn, thisp?): void
Parameters
- fn: ((value, i, list) => any)
- (value, i, list): any
Returns any
Optional
thisp: any
Returns void
get
- get(n): undefined | T
Returns undefined | T
getReverse
- getReverse(n): undefined | T
Returns undefined | T
map
- map<R>(fn, thisp?): Yallist<R>
Parameters
- fn: ((value, list) => R)
- (value, list): R
Returns R
Optional
thisp: any
mapReverse
- mapReverse<R>(fn, thisp?): Yallist<R>
Parameters
- fn: ((value, list) => R)
- (value, list): R
Returns R
Optional
thisp: any
pop
- pop(): undefined | T
Returns undefined | T
push
- push(...args): number
Returns number
pushNode
- pushNode(node): void
Returns void
reduce
- reduce(fn): T
Parameters
- fn: ((left, right, i) => T)
- (left, right, i): T
Returns T
Returns T
- reduce<R>(fn, initial): R
Parameters
- fn: ((acc, next, i) => R)
- (acc, next, i): R
Returns R
- initial: R
Returns R
reduceReverse
- reduceReverse(fn): T
Parameters
- fn: ((left, right, i) => T)
- (left, right, i): T
Returns T
Returns T
- reduceReverse<R>(fn, initial): R
Parameters
- fn: ((acc, next, i) => R)
- (acc, next, i): R
Returns R
- initial: R
Returns R
removeNode
- removeNode(node): undefined | Node<T>
Returns undefined | Node<T>
shift
- shift(): undefined | T
Returns undefined | T
slice
- slice(from?, to?): Yallist<unknown>
Parameters
- from: number = 0
- to: number = ...
Returns Yallist<unknown>
sliceReverse
- sliceReverse(from?, to?): Yallist<unknown>
Parameters
- from: number = 0
- to: number = ...
Returns Yallist<unknown>
splice
- splice(start, deleteCount?, ...nodes): T[]
Parameters
- start: number
- deleteCount: number = 0
Rest
...nodes: T[]
Returns T[]
toArray
- toArray(): any[]
Returns any[]
toArrayReverse
- toArrayReverse(): any[]
Returns any[]
unshift
- unshift(...args): number
Returns number
unshiftNode
- unshiftNode(node): void
Returns void