SpaceManager

Global manager for spaces.

Constructor

new SpaceManager()

Create a new space manager.

Methods

add(id, space) → {Space}

Add a space.
Parameters:
NameTypeDescription
idstringIdentifier of space
spaceSpaceSpace to add
Returns:
Space that was added.
Type: 
Space

get(id) → {Space|null}

Get a space by its identifier.
Parameters:
NameTypeDescription
idstringIdentifier of space
Returns:
Space with specified identifier, or null if it does not exist.
Type: 
Space | null

new(id, type)

Create and add a new space.
Parameters:
NameTypeDescription
idstringIdentifier of space
typeType of space

open(id)

Open a space by its identifier.
Parameters:
NameTypeDescription
idstringIdentifier of space to open

remove(id)

Remove a specific space.
Parameters:
NameTypeDescription
idstringIdentifier of space to remove