UNPKG

rhine-var

Version:

Variables that support multi-user collaboration and persistence, making collaboration and variable operations as simple as possible, with strict and well-defined type hints.

37 lines (36 loc) 1.04 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.log = log; exports.nativeLog = nativeLog; exports.warn = warn; exports.nativeWarn = nativeWarn; exports.error = error; exports.nativeError = nativeError; const config_1 = __importDefault(require("../config/config")); function log(...items) { if (config_1.default.ENABLE_LOG) { nativeLog(...items); } } function nativeLog(...items) { console.log('%cRhineVar', 'color: #b6ff00', ...items); } function warn(...items) { if (config_1.default.ENABLE_ERROR) { nativeError(...items); } } function nativeWarn(...items) { console.warn('%cRhineVar', 'color: #b6ff00', ...items); } function error(...items) { if (config_1.default.ENABLE_ERROR) { nativeError(...items); } } function nativeError(...items) { console.error('%cRhineVar', 'color: #b6ff00', ...items); }