Socket
Socket
Sign inDemoInstall

loglevel

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

loglevel - npm Package Compare versions

Comparing version 1.5.1 to 1.6.0

_config.yml

2

bower.json
{
"name": "loglevel",
"version": "1.5.1",
"version": "1.6.0",
"main": "dist/loglevel.min.js",

@@ -5,0 +5,0 @@ "dependencies": {},

@@ -1,2 +0,2 @@

/*! loglevel - v1.5.1 - https://github.com/pimterry/loglevel - (c) 2017 Tim Perry - licensed MIT */
/*! loglevel - v1.6.0 - https://github.com/pimterry/loglevel - (c) 2017 Tim Perry - licensed MIT */
(function (root, definition) {

@@ -156,2 +156,4 @@ "use strict";

self.name = name;
self.levels = { "TRACE": 0, "DEBUG": 1, "INFO": 2, "WARN": 3,

@@ -239,3 +241,7 @@ "ERROR": 4, "SILENT": 5};

defaultLogger.getLoggers = function getLoggers() {
return _loggersByName;
};
return defaultLogger;
}));

@@ -1,2 +0,2 @@

/*! loglevel - v1.5.1 - https://github.com/pimterry/loglevel - (c) 2017 Tim Perry - licensed MIT */
!function(a,b){"use strict";"function"==typeof define&&define.amd?define(b):"object"==typeof module&&module.exports?module.exports=b():a.log=b()}(this,function(){"use strict";function a(a,b){var c=a[b];if("function"==typeof c.bind)return c.bind(a);try{return Function.prototype.bind.call(c,a)}catch(b){return function(){return Function.prototype.apply.apply(c,[a,arguments])}}}function b(b){return"debug"===b&&(b="log"),typeof console!==h&&(void 0!==console[b]?a(console,b):void 0!==console.log?a(console,"log"):g)}function c(a,b){for(var c=0;c<i.length;c++){var d=i[c];this[d]=c<a?g:this.methodFactory(d,a,b)}this.log=this.debug}function d(a,b,d){return function(){typeof console!==h&&(c.call(this,b,d),this[a].apply(this,arguments))}}function e(a,c,e){return b(a)||d.apply(this,arguments)}function f(a,b,d){function f(a){var b=(i[a]||"silent").toUpperCase();if(typeof window!==h){try{return void(window.localStorage[l]=b)}catch(a){}try{window.document.cookie=encodeURIComponent(l)+"="+b+";"}catch(a){}}}function g(){var a;if(typeof window!==h){try{a=window.localStorage[l]}catch(a){}if(typeof a===h)try{var b=window.document.cookie,c=b.indexOf(encodeURIComponent(l)+"=");-1!==c&&(a=/^([^;]+)/.exec(b.slice(c))[1])}catch(a){}return void 0===k.levels[a]&&(a=void 0),a}}var j,k=this,l="loglevel";a&&(l+=":"+a),k.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},k.methodFactory=d||e,k.getLevel=function(){return j},k.setLevel=function(b,d){if("string"==typeof b&&void 0!==k.levels[b.toUpperCase()]&&(b=k.levels[b.toUpperCase()]),!("number"==typeof b&&b>=0&&b<=k.levels.SILENT))throw"log.setLevel() called with invalid level: "+b;if(j=b,!1!==d&&f(b),c.call(k,b,a),typeof console===h&&b<k.levels.SILENT)return"No console available for logging"},k.setDefaultLevel=function(a){g()||k.setLevel(a,!1)},k.enableAll=function(a){k.setLevel(k.levels.TRACE,a)},k.disableAll=function(a){k.setLevel(k.levels.SILENT,a)};var m=g();null==m&&(m=null==b?"WARN":b),k.setLevel(m,!1)}var g=function(){},h="undefined",i=["trace","debug","info","warn","error"],j=new f,k={};j.getLogger=function(a){if("string"!=typeof a||""===a)throw new TypeError("You must supply a name when creating a logger.");var b=k[a];return b||(b=k[a]=new f(a,j.getLevel(),j.methodFactory)),b};var l=typeof window!==h?window.log:void 0;return j.noConflict=function(){return typeof window!==h&&window.log===j&&(window.log=l),j},j});
/*! loglevel - v1.6.0 - https://github.com/pimterry/loglevel - (c) 2017 Tim Perry - licensed MIT */
!function(a,b){"use strict";"function"==typeof define&&define.amd?define(b):"object"==typeof module&&module.exports?module.exports=b():a.log=b()}(this,function(){"use strict";function a(a,b){var c=a[b];if("function"==typeof c.bind)return c.bind(a);try{return Function.prototype.bind.call(c,a)}catch(b){return function(){return Function.prototype.apply.apply(c,[a,arguments])}}}function b(b){return"debug"===b&&(b="log"),typeof console!==h&&(void 0!==console[b]?a(console,b):void 0!==console.log?a(console,"log"):g)}function c(a,b){for(var c=0;c<i.length;c++){var d=i[c];this[d]=c<a?g:this.methodFactory(d,a,b)}this.log=this.debug}function d(a,b,d){return function(){typeof console!==h&&(c.call(this,b,d),this[a].apply(this,arguments))}}function e(a,c,e){return b(a)||d.apply(this,arguments)}function f(a,b,d){function f(a){var b=(i[a]||"silent").toUpperCase();if(typeof window!==h){try{return void(window.localStorage[l]=b)}catch(a){}try{window.document.cookie=encodeURIComponent(l)+"="+b+";"}catch(a){}}}function g(){var a;if(typeof window!==h){try{a=window.localStorage[l]}catch(a){}if(typeof a===h)try{var b=window.document.cookie,c=b.indexOf(encodeURIComponent(l)+"=");-1!==c&&(a=/^([^;]+)/.exec(b.slice(c))[1])}catch(a){}return void 0===k.levels[a]&&(a=void 0),a}}var j,k=this,l="loglevel";a&&(l+=":"+a),k.name=a,k.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},k.methodFactory=d||e,k.getLevel=function(){return j},k.setLevel=function(b,d){if("string"==typeof b&&void 0!==k.levels[b.toUpperCase()]&&(b=k.levels[b.toUpperCase()]),!("number"==typeof b&&b>=0&&b<=k.levels.SILENT))throw"log.setLevel() called with invalid level: "+b;if(j=b,!1!==d&&f(b),c.call(k,b,a),typeof console===h&&b<k.levels.SILENT)return"No console available for logging"},k.setDefaultLevel=function(a){g()||k.setLevel(a,!1)},k.enableAll=function(a){k.setLevel(k.levels.TRACE,a)},k.disableAll=function(a){k.setLevel(k.levels.SILENT,a)};var m=g();null==m&&(m=null==b?"WARN":b),k.setLevel(m,!1)}var g=function(){},h="undefined",i=["trace","debug","info","warn","error"],j=new f,k={};j.getLogger=function(a){if("string"!=typeof a||""===a)throw new TypeError("You must supply a name when creating a logger.");var b=k[a];return b||(b=k[a]=new f(a,j.getLevel(),j.methodFactory)),b};var l=typeof window!==h?window.log:void 0;return j.noConflict=function(){return typeof window!==h&&window.log===j&&(window.log=l),j},j.getLoggers=function(){return k},j});

@@ -161,2 +161,4 @@ /*

self.name = name;
self.levels = { "TRACE": 0, "DEBUG": 1, "INFO": 2, "WARN": 3,

@@ -244,3 +246,7 @@ "ERROR": 4, "SILENT": 5};

defaultLogger.getLoggers = function getLoggers() {
return _loggersByName;
};
return defaultLogger;
}));
{
"name": "loglevel",
"description": "Minimal lightweight logging for JavaScript, adding reliable log level methods to any available console.log methods",
"version": "1.5.1",
"version": "1.6.0",
"homepage": "https://github.com/pimterry/loglevel",

@@ -6,0 +6,0 @@ "author": {

@@ -42,3 +42,3 @@

Alternatively if you just want to grab the file yourself, you can download either the current stable [production version][min] or the [development version][max] directly, or reference it remotely on CDNJS at `//cdnjs.cloudflare.com/ajax/libs/loglevel/1.5.0/loglevel.min.js`
Alternatively if you just want to grab the file yourself, you can download either the current stable [production version][min] or the [development version][max] directly, or reference it remotely on unpkg at [`https://unpkg.com/loglevel/dist/loglevel.min.js`][cdn] (this will redirect to a latest version, use the resulting redirected URL if you want to pin that version).

@@ -49,2 +49,3 @@ Finally, if you want to tweak loglevel to your own needs or you immediately need the cutting-edge version, clone this repo and see [Developing & Contributing](#developing--contributing) below for build instructions.

[max]: https://raw.github.com/pimterry/loglevel/master/dist/loglevel.js
[cdn]: https://unpkg.com/loglevel/dist/loglevel.min.js

@@ -204,3 +205,6 @@ ## Setting it up

* A `log.getLoggers()` method.
This will return you the dictionary of all loggers created with `getLogger`, keyed off of their names.
## Plugins

@@ -267,3 +271,2 @@

* Run `npm publish .` to publish to NPM
* Update CDN url once https://cdnjs.com/libraries/loglevel picks up the new version
* Autoupdate gh-pages docs

@@ -304,4 +307,6 @@

v1.6.0 - Add a name property to loggers and add log.getLoggers() (#114), and recommend unpkg as CDN instead of CDNJS.
## License
Copyright (c) 2013 Tim Perry
Licensed under the MIT license.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc