Context

index~ Context

new Context(name, setToDefaultopt, groupopt)

Description:
  • Creates a new context
Source:
Parameters:
Name Type Attributes Default Description
name string Name of context
setToDefault boolean <optional>
false Whether to automatically switch to the context
group group <optional>
unknown_g() The group to give to the context

Members

current

Description:
  • The name of the current context
Source:
The name of the current context

list

Description:
  • A list of all contexts added
Source:
A list of all contexts added

Methods

(static) add(context)

Description:
  • Converts an object into a context
Source:
Parameters:
Name Type Description
context context Object to convert into a context

(static) addObject(objectToAdd)

Description:
  • Adds an object into the current context
Source:
Parameters:
Name Type Description
objectToAdd object Object to add into current context

(static) findByGroup(groupToSearch) → {context}

Description:
  • Finds a context based off of its assigned group
Source:
Parameters:
Name Type Description
groupToSearch group
Returns:
Found context
Type
context

(static) findByName(name) → {context}

Description:
  • Finds a context based off of its name
Source:
Parameters:
Name Type Description
name string Name of the context
Returns:
Found context
Type
context

(static) isLinked(ctx) → {boolean}

Description:
  • Checks if a context has a parent
Source:
Parameters:
Name Type Description
ctx context Context to check for parent
Returns:
Whether context has a parent
Type
boolean
Description:
  • Links an existing context into the current one, allowing you to find the parent context of another context
Source:
Parameters:
Name Type Description
context context Context to link into current
ctxLink string Optional context that should be the parent of input context

(static) set(name)

Description:
  • Switches the context
Source:
Parameters:
Name Type Description
name string | group Name or group of context to switch to