tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

environment.js (419B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this
      3 * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
      4 
      5 export function isNode() {
      6  try {
      7    return process.release.name == "node";
      8  } catch (e) {
      9    return false;
     10  }
     11 }
     12 
     13 export function isNodeTest() {
     14  return isNode() && process.env.NODE_ENV != "production";
     15 }