The ScopeSet class creates a set of scopes. Scopes are case-insensitive, unique values, so the Set object in JS makes the most sense to implement for this class. All scopes are trimmed and converted to lower case strings in intersection and union functions to ensure uniqueness of strings.

Hierarchy

  • ScopeSet

Constructors

Methods

  • Appends single scope if passed

    Parameters

    • newScope: string

    Returns void

  • Appends multiple scopes if passed

    Parameters

    • newScopes: string[]

    Returns void

  • Returns the scopes as an array of string values

    Returns string[]

  • Check if set of scopes contains only the defaults

    Returns boolean

  • Check if a given scope is present in this set of scopes.

    Parameters

    • scope: string

    Returns boolean

  • Check if a set of scopes is present in this set of scopes.

    Parameters

    Returns boolean

  • Check if scopes intersect between this set and another.

    Parameters

    Returns boolean

  • Prints scopes into a space-delimited string

    Returns string

  • Prints scopes into a space-delimited lower-case string (used for caching)

    Returns string

  • Removes default scopes from set of scopes Primarily used to prevent cache misses if the default scopes are not returned from the server

    Returns void

  • Removes element from set of scopes.

    Parameters

    • scope: string

    Returns void

  • Combines an array of scopes with the current set of scopes.

    Parameters

    Returns Set<string>

  • Creates the set of scopes to search for in cache lookups

    Parameters

    • inputScopeString: string[]

    Returns ScopeSet

Generated using TypeDoc