more linting

This commit is contained in:
Gareth Jones 2013-05-30 08:26:03 +10:00
parent 40ec9e98e4
commit 516320c79a

View File

@ -1,3 +1,5 @@
"use strict";
function Level(level, levelStr) { function Level(level, levelStr) {
this.level = level; this.level = level;
this.levelStr = levelStr; this.levelStr = levelStr;
@ -26,8 +28,7 @@ function toLevel(sArg, defaultLevel) {
} }
return toLevel(sArg.toString()); return toLevel(sArg.toString());
}
};
Level.prototype.toString = function() { Level.prototype.toString = function() {
return this.levelStr; return this.levelStr;
@ -52,16 +53,16 @@ Level.prototype.isEqualTo = function(otherLevel) {
otherLevel = toLevel(otherLevel); otherLevel = toLevel(otherLevel);
} }
return this.level === otherLevel.level; return this.level === otherLevel.level;
} };
module.exports = { module.exports = {
ALL: new Level(Number.MIN_VALUE, "ALL") ALL: new Level(Number.MIN_VALUE, "ALL"),
, TRACE: new Level(5000, "TRACE") TRACE: new Level(5000, "TRACE"),
, DEBUG: new Level(10000, "DEBUG") DEBUG: new Level(10000, "DEBUG"),
, INFO: new Level(20000, "INFO") INFO: new Level(20000, "INFO"),
, WARN: new Level(30000, "WARN") WARN: new Level(30000, "WARN"),
, ERROR: new Level(40000, "ERROR") ERROR: new Level(40000, "ERROR"),
, FATAL: new Level(50000, "FATAL") FATAL: new Level(50000, "FATAL"),
, OFF: new Level(Number.MAX_VALUE, "OFF") OFF: new Level(Number.MAX_VALUE, "OFF"),
, toLevel: toLevel toLevel: toLevel
}; };