Namespace: Data

Bravey.Data

Data manipulation related functions.
Source:

Methods

(static) getEntityValue(matchdata, entityname, defaultvalueopt) → {string|undefined}

Extract entities or context values with the same name from a Bravey.ContextManager.testBySessionId call result.
Parameters:
Name Type Attributes Description
matchdata ContextManagerResultBySessionId The data returned by Bravey.ContextManager.testBySessionId.
entityname string The data returned by Bravey.ContextManager.testBySessionId.
defaultvalue string <optional>
The matched entity value cosidered as "default". (i.e. if found, session data value is returned anyway)
Source:
Returns:
  • The matching value.
    Type
    string
  • If the entity name is not set in match or session.
    Type
    undefined

(static) isExplicit(matchdata, entityname) → {true}

Returns true if a Bravey.ContextManager.testBySessionId result contains the specified entity.
Parameters:
Name Type Description
matchdata ContextManagerResultBySessionId The data returned by Bravey.ContextManager.testBySessionId.
entityname string The entity to be checked.
Source:
Returns:
When the entity is specified.
Type
true