Skip to main content
Module

x/permissionGuard/mod.ts>GuardOptions

A zero-dependency, minimal permission guard for Deno.
Latest
interface GuardOptions
import { type GuardOptions } from "https://deno.land/x/permissionGuard@2.4.0/mod.ts";

Configuration for the guard.

Use with the guard() method.

Properties

optional
granted: GuardGrant[]

An optional list of Deno permission names or descriptors that should be permitted by the guard

optional
exitOnMissing: boolean

An optional flag to determine whether the guard should stop the process when permissions listed in the granted array have not been granted.

optional
exitOnExtra: boolean

An optional flag to determine whether the guard should stop the process when permissions not listed in the granted array have been granted.

optional
revoke: boolean

An optional flag to determine whether the guard should revoke top-level permissions not listed in the granted array.

optional
log: boolean

An optional flag to determine the guard should log any warnings or errors to the console.