source: node_modules/es-toolkit/dist/predicate/isNode.d.ts

Last change on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 457 bytes
Line 
1/**
2 * Checks if the current environment is Node.js.
3 *
4 * This function checks for the existence of the `process.versions.node` property,
5 * which only exists in Node.js environments.
6 *
7 * @returns {boolean} `true` if the current environment is Node.js, otherwise `false`.
8 *
9 * @example
10 * if (isNode()) {
11 * console.log('This is running in Node.js');
12 * const fs = import('node:fs');
13 * }
14 */
15declare function isNode(): boolean;
16
17export { isNode };
Note: See TracBrowser for help on using the repository browser.