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){
(function(global){/*global window, global*/
var functions = [
[log, "log"]
, [info, "info"]
, [warn, "warn"]
, [error, "error"]
, [time, "time"]
, [timeEnd, "timeEnd"]
, [trace, "trace"]
, [dir, "dir"]
, [assert, "assert"]
]
[
"log", "info", "warn", "error", "time",
"timeEnd", "trace", "dir", "assert"
].forEach(function(x) {
exports[x] = nop;
});
for (var i = 0; i < functions.length; i++) {
var tuple = functions[i]
var f = tuple[0]
var name = tuple[1]
function nop() {}
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){