Class: ZyreGroups

ZyreGroups()

ZyreGroups manages all ZyreGroup objects.

Constructor

new ZyreGroups()

Source:

Methods

exists(name) → {boolean}

Returns true if a ZyreGroup with the given name exists.
Parameters:
Name Type Description
name string Name of the group
Source:
Returns:
Type
boolean

getGroup(name) → {ZyreGroup}

Returns a ZyreGroup with the given name.
Parameters:
Name Type Description
name string Name of the group
Source:
Returns:
Type
ZyreGroup

push(name, zyrePeer)

Adds a new ZyrePeer to the ZyreGroup with the given name. Creates a new ZyreGroup if a group with the given name doesn't exist yet.
Parameters:
Name Type Description
name string Name of the group
zyrePeer ZyrePeer ZyrePeer
Source:

remove(name, zyrePeer)

Removes a ZyrePeer from an existing ZyreGroup.
Parameters:
Name Type Description
name string Name of the group
zyrePeer ZyrePeer ZyrePeer
Source:

toObj() → {GroupsObject}

Creates an object with public data of all groups.
Source:
Returns:
Type
GroupsObject