tweak jshint console mock

This commit is contained in:
nightwing 2013-07-24 22:57:46 +04:00
commit cacd51e2fe

View file

@ -1075,50 +1075,15 @@ exports.register = function (linter) {
}, },
{}], {}],
7:[function(req,module,exports){ 7:[function(req,module,exports){
(function(global){/*global window, global*/ [
var functions = [ "log", "info", "warn", "error", "time",
[log, "log"] "timeEnd", "trace", "dir", "assert"
, [info, "info"] ].forEach(function(x) {
, [warn, "warn"] exports[x] = nop;
, [error, "error"] });
, [time, "time"]
, [timeEnd, "timeEnd"]
, [trace, "trace"]
, [dir, "dir"]
, [assert, "assert"]
]
for (var i = 0; i < functions.length; i++) { function nop() {}
var tuple = functions[i]
var f = tuple[0]
var name = tuple[1]
if (!console[name]) {
console[name] = f
}
}
module.exports = console
function log() {}
function info() {}
function warn() {}
function error() {}
function time(label) {}
function timeEnd(label) {}
function trace() {}
function dir(object) {}
function assert(expression) {}
})(window)
}, },
{}], {}],
"jshint":[function(req,module,exports){ "jshint":[function(req,module,exports){