Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/fresh/runtime.ts

The next-gen web framework.
Extremely Popular
Go to Latest
import * as fresh from "https://deno.land/x/fresh@1.6.1/runtime.ts";

Variables

Returns true when the current runtime is the browser and false otherwise. This is used for guard runtime-dependent code. Shorthand for the following: typeof document !== "undefined"

Functions

Create a "locked" asset path. This differs from a plain path in that it is specific to the current version of the application, and as such can be safely served with a very long cache lifetime (1 year).

Apply the asset function to urls in a srcset attribute.