Repl.before() method
Home > streplts > Repl > before
Repl.before() method
Section titled “Repl.before() method”Registers an interception hook executing prior to executing valid matching user inputs.
Signature:
before(fn: HookFn): this;Parameters
Section titled “Parameters”|
Parameter |
Type |
Description |
|---|---|---|
|
fn |
HookFn |
Interceptor block function. Throwing inside halts downstream command executions. |
Returns:
this
Context instance enabling chained interceptor definitions.