Checks if the current environment is browser-like (browser, React Native, or Cloudflare).
Combines checks for browser, React Native, and Cloudflare environments.
true if running in any browser-like environment
if (isBrowserLike()) { // Safe to use navigation APIs window.location.href = '/dashboard';} else { // Use Node.js specific path handling const path = require('path'); const fullPath = path.join(process.cwd(), 'dashboard');} Copy
if (isBrowserLike()) { // Safe to use navigation APIs window.location.href = '/dashboard';} else { // Use Node.js specific path handling const path = require('path'); const fullPath = path.join(process.cwd(), 'dashboard');}
Checks if the current environment is browser-like (browser, React Native, or Cloudflare).
Combines checks for browser, React Native, and Cloudflare environments.