UNPKG

molstar

Version:

A comprehensive macromolecular library.

46 lines 1.49 kB
"use strict"; /** * Copyright (c) 2019-2020 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Alexander Rose <alexander.rose@weirdbyte.de> */ Object.defineProperty(exports, "__esModule", { value: true }); exports.setDebugMode = exports.setProductionMode = exports.isDebugMode = exports.isProductionMode = void 0; /** * on node `process.env.NODE_ENV` is available, in webpack build it is automatically set * by the DefinePlugin to the webpack `mode` value */ var isProductionMode = function () { try { return process.env.NODE_ENV === 'production'; } catch (_a) { return false; } }(); exports.isProductionMode = isProductionMode; /** * set to true to enable more comprehensive checks and assertions, * mostly used in `mol-gl` and in valence-model calculation */ var isDebugMode = function getIsDebug() { try { var val = process.env.DEBUG; return val === '*' || val === 'molstar'; } catch (_a) { return false; } }(); exports.isDebugMode = isDebugMode; function setProductionMode(value) { if (typeof value !== 'undefined') exports.isProductionMode = isProductionMode = value; } exports.setProductionMode = setProductionMode; function setDebugMode(value) { if (typeof value !== 'undefined') exports.isDebugMode = isDebugMode = value; } exports.setDebugMode = setDebugMode; //# sourceMappingURL=debug.js.map