Skip to content

Repl.before() method

Home > streplts > Repl > before

Registers an interception hook executing prior to executing valid matching user inputs.

Signature:

before(fn: HookFn): this;

Parameter

Type

Description

fn

HookFn

Interceptor block function. Throwing inside halts downstream command executions.

Returns:

this

Context instance enabling chained interceptor definitions.