Files
cannaiq/frontend/node_modules/es-toolkit/dist/predicate/isNode.d.mts
2025-11-28 19:45:44 -07:00

18 lines
457 B
TypeScript

/**
* Checks if the current environment is Node.js.
*
* This function checks for the existence of the `process.versions.node` property,
* which only exists in Node.js environments.
*
* @returns {boolean} `true` if the current environment is Node.js, otherwise `false`.
*
* @example
* if (isNode()) {
* console.log('This is running in Node.js');
* const fs = import('node:fs');
* }
*/
declare function isNode(): boolean;
export { isNode };