isNodejs

isNodeJS

Returns true when runtime is NodeJS.

Import

import { isNodeJS } from '@fullstacksjs/toolbox';

Signature

function isNodeJS(): boolean {}

Examples

if (isNodeJS()) global.process.env;
if (!isNodeJS()) console.log('Deno, bun, or browser?');