From 26762011b9dfb955c0d7b7523451eef39fed98f4 Mon Sep 17 00:00:00 2001 From: Samuel Kopp <62482066+boywithkeyboard@users.noreply.github.com> Date: Wed, 16 Aug 2023 02:19:38 +0200 Subject: [PATCH] feat: `c.dev` (#172) --- context.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/context.ts b/context.ts index ce81c72..079dee4 100644 --- a/context.ts +++ b/context.ts @@ -88,6 +88,10 @@ export class Context< return this.#a } + get dev(): boolean { + return this.runtime === 'deno' && Deno.env.get('DEV') === 'true' + } + get req(): RequestContext< Params, ValidatedBody,