loglevel-plugin-prefix
Advanced tools
Comparing version 0.5.1 to 0.5.2
@@ -1,2 +0,2 @@ | ||
(function (global, factory) { | ||
(function (root, factory) { | ||
if (typeof define === 'function' && define.amd) { | ||
@@ -7,5 +7,5 @@ define(factory); | ||
} else { | ||
global.prefix = factory(global); | ||
root.prefix = factory(root); | ||
} | ||
}(this, function (global) { | ||
}(this, function (root) { | ||
'use strict'; | ||
@@ -117,7 +117,7 @@ | ||
var save; | ||
if (global) { | ||
save = global.prefix; | ||
if (root) { | ||
save = root.prefix; | ||
api.noConflict = function () { | ||
if (global.prefix === api) { | ||
global.prefix = save; | ||
if (root.prefix === api) { | ||
root.prefix = save; | ||
} | ||
@@ -124,0 +124,0 @@ return api; |
@@ -25,3 +25,3 @@ { | ||
"license": "MIT", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"main": "./lib/loglevel-plugin-prefix", | ||
@@ -45,2 +45,2 @@ "scripts": { | ||
} | ||
} | ||
} |
@@ -25,9 +25,9 @@ # loglevel-plugin-prefix | ||
template: '[%t] %l:', | ||
timestampFormatter: function timestampFormatter(date) { | ||
timestampFormatter: function (date) { | ||
return date.toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, '$1'); | ||
}, | ||
levelFormatter: function levelFormatter(level) { | ||
levelFormatter: function (level) { | ||
return level.toUpperCase(); | ||
}, | ||
nameFormatter: function nameFormatter(name) { | ||
nameFormatter: function (name) { | ||
return name || 'root'; | ||
@@ -34,0 +34,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17083