mirror of
https://github.com/nuintun/command-manager.git
synced 2025-06-06 10:54:07 +08:00
28 lines
595 B
JavaScript
28 lines
595 B
JavaScript
/**
|
|
* Created by nuintun on 2015/11/24.
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
module.exports = function (Terminal){
|
|
Terminal.prototype.log = function (){
|
|
if (!Terminal.debug) return;
|
|
|
|
if (!window.console || !window.console.log) return;
|
|
|
|
var args = Array.prototype.slice.call(arguments);
|
|
|
|
window.console.log.apply(window.console, args);
|
|
};
|
|
|
|
Terminal.prototype.error = function (){
|
|
if (!Terminal.debug) return;
|
|
|
|
if (!window.console || !window.console.error) return;
|
|
|
|
var args = Array.prototype.slice.call(arguments);
|
|
|
|
window.console.error.apply(window.console, args);
|
|
};
|
|
};
|