JS Utils Kit - v0.5.1
    Preparing search index...

    Function isNode

    • Checks if the current runtime environment is Node.js.

      This function is useful to conditionally execute server-side logic. It detects the Node.js environment by verifying the presence of the global process object and its versions.node property.

      Returns boolean

      true if running in Node.js, otherwise false.

      if (isNode()) {
      console.log('Running in Node.js environment');
      }