Collector

Collector

new Collector()

Extends array, provides more methods to work with collections such as Pots and Hook

Source:

Extends

  • Array

Methods

find(e) → {number}

Find index of element inside collection

Parameters:
Name Type Description
e mixed

element to find

Source:
Returns:

index when found, -1 on the opposite side

Type
number

flush()

Erase a collection

Source:

has(e) → {boolean}

Check if a collection contains an element

Parameters:
Name Type Description
e mixed

element to find

Source:
Returns:

true on found and vice versa

Type
boolean

remove(e)

Remove an element

Parameters:
Name Type Description
e mixed

element to remove

Source: