Class CollectorSingleton

Constructors

Properties

version: string = "VERSION_REPLACE_ME"

The version of the module.

DiobConstructor: any = ...

The constructor of the Diob class

collectionLimit: number = 20

Collection limit on arrays.

WARNING_LIMIT: number = 200

Warning limit.

basicCollection: any[] = []

A default collection to use.

isInCollection: ((pType?, pNum?, pCollection?, ...pRest) => any) = ...

Gets diob instance(s) from the named collection and returns them. If no instances exist in the collection, a new one is created as a last resort.

Type declaration

    • (pType?, pNum?, pCollection?, ...pRest): any
    • Parameters

      • pType: string = 'Diob'

        The diob type to find in the collection.

      • pNum: number = 1

        How many of the diob instances to get from the collection.

      • pCollection: any[] = []

        The collection to retrieve these instances from.

      • Rest ...pRest: any[]

        Remaining args to be passed into the new constructor of the diob or onDumped event

      Returns any

Deprecated

Returns

The diob instance that was in the collection.

Methods

  • Sets the max collection limit of this module.

    Parameters

    • pLimit: number

      The max limit of instances a collection can hold.

    Returns void

  • Collects a instance into a collection.

    Parameters

    • pCollected: any

      The instance to collect.

    • pCollection: any[]

      The collection array to collect the instance to.

    Returns void

  • Gets diob instance(s) from the named collection and returns them. If no instances exist in the collection, a new one is created as a last resort.

    Parameters

    • pType: string = 'Diob'

      The diob type to find in the collection.

    • pNum: number = 1

      How many of the diob instances to get from the collection.

    • pCollection: any[] = []

      The collection to retrieve these instances from.

    • Rest ...pRest: any[]

      Remaining args to be passed into the new constructor of the diob or onDumped event

    Returns any

    The diob instance that was in the collection.