Skip to main content

CollectionGroup

view on npm

A group of data

.id : string

The internal ID of the Group

.instanceId : string

The internal id of the group with an instance prefix

.index : Set.<string>

Peek at the index of the group (get all of the lookup keys for the group)

.value : Array.<DataType>

The data values of the items in the group

.data : Array.<PlexusDataInstance>

The data Items in the group

.size : number

The number of things in the group (length of the index array)

.has(key) ⇒ boolean

Check if the group contains the given item

Returns: boolean

Whether or not the group contains the item

ParamTypeDescription
keystring

The key of the item to look for

.add(keys) ⇒ this

Add an item to the group

Returns: this

This Group instance

ParamTypeDescription
keysstring | number

The key or array of keys of the item to look for

.remove(key) ⇒ this

Remove an item from the group

Returns: this

This Group instance

ParamTypeDescription
keystring | Array.<string>

The key of the item to look for

.clear() ⇒ this

Clears the group of all items

Returns: this

This Group instance