TS-Scribe - v1.2.0
    Preparing search index...

    Function getEnvironment

    • Detects the current runtime environment.

      Returns "Node" | "Bun" | "Browser" | "Unknown"

      A string indicating the environment. Possible values: 'Browser', 'Node', 'Bun', 'Unknown'.

      if (getEnvironment() === 'Node') {
      console.log('Running in Node.js');
      } else if (getEnvironment() === 'Bun') {
      console.log('Running in Bun');
      } else if (getEnvironment() === 'Browser') {
      console.log('Running in a browser');
      }