The key by which to check uniqueness against. undefined if no uniqueness constraint is set.
Protected
_checkProtected
_removeProtected
internal remove function, to remove an item from the collection, does not raise an event.
returns the index of the removed item or -1 if the item has not been found.
Adds an item to the collection.
the item to be inserted
the index at which the item was inserted
Returns an item identified by the unique constraint key. Returns null, if there is no uniqueness constraint.
the value to test against. does a shallow comparison, if the passed a non-atomic value
Equivalent to Array.prototype.includes
Removes an item from the collection
Creates a FlightPlayer for a flight instance, if not already existing for provided instance
Static
fromCreates a Collection from an iterable, such as an Array.
Optional
uniqueKey: false | keyof Fa key to maintain uniquely within the collection. passing false disables uniqueness.
Private
Readonly
_appProtected
_arrayPrivate
_playerPrivate
_playerEvent raised if an item is added. Is passed the added item.
Event raised if an item is removed. Is passed the removed item.
Generated using TypeDoc
A collection of flights. Provides playFlight API, which returns a FlightPlayer. Emits playerChanged event, whenever another flight is played.