Skip to content

isBrowser

Check if the current environment is a browser.

Usage

import { isBrowser } from "@/helpers/is-browser";
if (isBrowser()) {
console.log("This is a browser environment.");
} else {
console.log("This is not a browser environment.");
}

Installation

Terminal window
npx atmx add helper is-browser