Vana SDK - v4.1.0
    Preparing search index...

    Function parseScopeEntry

    • Split one grant scope entry into its operation and scope pattern.

      • notes.entries parses as { scope: "notes.entries", action: "read" }
      • write:notes.* parses as { scope: "notes.*", action: "write" }

      Fails closed: a non-string entry, or an entry whose operation prefix is not recognised (including read:, any uppercase or non-ASCII prefix, or a wildcard in the operation position) throws InvalidScopeEntryError and is never treated as a read entry. An empty scope part (write:) throws as well.

      Parameters

      • entry: string

        A single element of a grant's scopes array.

      Returns ParsedScopeEntry

      The operation and the scope pattern it applies to.

      InvalidScopeEntryError when the entry does not fit the grammar.