Skip to content

Function: snapshotSatisfies() ​

ts
function snapshotSatisfies(
   snapshot, 
   requirement, 
   options?
): boolean;

Defined in: packages/next/src/snapshot.ts:22

Synchronously checks a requirement against a snapshot. Arrays mean "any of".

Parameters ​

ParameterType
snapshotRbacSnapshot
requirementRequirement
options?SnapshotCheckOptions

Returns ​

boolean

Released under the MIT License. Inspired by spatie/laravel-permission.