Skip to content

TypeScript API / laikacms/auth / isScope

Function: isScope() ​

ts
function isScope(value): value is Scope;

True if value is a syntactically valid scope: admin, *, or a resource:action pair with non-empty resource and action. Structural, not membership, so a consumer's shipping:read is valid.

Parameters ​

ParameterType
valuestring

Returns ​

value is Scope

Released under the MIT License.