UNPKG

1.81 kBJavaScriptView Raw
1(function (factory) {
2 if (typeof module === "object" && typeof module.exports === "object") {
3 var v = factory(require, exports);
4 if (v !== undefined) module.exports = v;
5 }
6 else if (typeof define === "function" && define.amd) {
7 define(["require", "exports", "@theintern/common"], factory);
8 }
9})(function (require, exports) {
10 "use strict";
11 Object.defineProperty(exports, "__esModule", { value: true });
12 exports.warn = exports.error = exports.log = void 0;
13 var common_1 = require("@theintern/common");
14 function log() {
15 var args = [];
16 for (var _i = 0; _i < arguments.length; _i++) {
17 args[_i] = arguments[_i];
18 }
19 if (common_1.global.console && common_1.global.console.log) {
20 try {
21 common_1.global.console.log.apply(common_1.global.console, args);
22 }
23 catch (error) { }
24 }
25 }
26 exports.log = log;
27 function error() {
28 var args = [];
29 for (var _i = 0; _i < arguments.length; _i++) {
30 args[_i] = arguments[_i];
31 }
32 if (common_1.global.console && common_1.global.console.error) {
33 try {
34 common_1.global.console.error.apply(common_1.global.console, args);
35 }
36 catch (error) { }
37 }
38 }
39 exports.error = error;
40 function warn() {
41 var args = [];
42 for (var _i = 0; _i < arguments.length; _i++) {
43 args[_i] = arguments[_i];
44 }
45 if (common_1.global.console && common_1.global.console.warn) {
46 try {
47 common_1.global.console.warn.apply(common_1.global.console, args);
48 }
49 catch (error) { }
50 }
51 }
52 exports.warn = warn;
53});
54//# sourceMappingURL=console.js.map
\No newline at end of file