custom-log
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -21,3 +21,3 @@ // Generated by CoffeeScript 1.9.1 | ||
if (_this.enabled) { | ||
return console.log((ref = _this.message).concat.apply(ref, arguments)); | ||
return console.log.apply(console, (ref = [_this.message]).concat.apply(ref, arguments)); | ||
} | ||
@@ -24,0 +24,0 @@ }; |
@@ -1,1 +0,1 @@ | ||
(function(){"use strict";var e,n=function(e,n){return function(){return e.apply(n,arguments)}};e=function(e){var t,o,i,l,s,u;if(t=function(){function e(e,t){var o,i;this.level=null!=e?e:"log",this.message=null!=t?t:"",this.enable=n(this.enable,this),this.disable=n(this.disable,this),this.enabled=!0,this.log=function(e){return function(){var n;return e.enabled?console.log((n=e.message).concat.apply(n,arguments)):void 0}}(this);for(o in this)i=this[o],this.hasOwnProperty(o)&&"log"!==o&&(this.log[o]=i)}return e.prototype.disable=function(){return this.enabled=!1,console.log("CUSTOM-LOG: "+this.level+" has been disabled.")},e.prototype.enable=function(){return this.enabled=!0,console.log("CUSTOM-LOG: "+this.level+" is now enabled.")},e}(),"string"==typeof e&&(u=e),l=new t("log",u).log,"object"==typeof e){o=function(e,n){return"log"===e?l=new t(e,n).log:l[e]=new t(e,n).log};for(i in e)s=e[i],o(i,s)}return l},"undefined"!=typeof define&&null!==define&&"function"==typeof define&&define.amd?define("customLog",[],function(){return e}):"undefined"!=typeof module?module.exports=e:"undefined"!=typeof window&&(window.customLog=e)}).call(this); | ||
(function(){"use strict";var e,n=function(e,n){return function(){return e.apply(n,arguments)}};e=function(e){var t,o,i,l,s,u;if(t=function(){function e(e,t){var o,i;this.level=null!=e?e:"log",this.message=null!=t?t:"",this.enable=n(this.enable,this),this.disable=n(this.disable,this),this.enabled=!0,this.log=function(e){return function(){var n;return e.enabled?console.log.apply(console,(n=[e.message]).concat.apply(n,arguments)):void 0}}(this);for(o in this)i=this[o],this.hasOwnProperty(o)&&"log"!==o&&(this.log[o]=i)}return e.prototype.disable=function(){return this.enabled=!1,console.log("CUSTOM-LOG: "+this.level+" has been disabled.")},e.prototype.enable=function(){return this.enabled=!0,console.log("CUSTOM-LOG: "+this.level+" is now enabled.")},e}(),"string"==typeof e&&(u=e),l=new t("log",u).log,"object"==typeof e){o=function(e,n){return"log"===e?l=new t(e,n).log:l[e]=new t(e,n).log};for(i in e)s=e[i],o(i,s)}return l},"undefined"!=typeof define&&null!==define&&"function"==typeof define&&define.amd?define("customLog",[],function(){return e}):"undefined"!=typeof module?module.exports=e:"undefined"!=typeof window&&(window.customLog=e)}).call(this); |
{ | ||
"name": "custom-log", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "A tiny flexible logger", | ||
@@ -5,0 +5,0 @@ "main": "custom-log.min.js", |
@@ -9,5 +9,5 @@ custom-log | ||
custom-log is targeted at the Browser as a tiny helper that makes available any custom log function you can | ||
create yourself and which can be enabled/disabled individually. | ||
create yourself, and which can be enabled/disabled individually. | ||
Although there are plenty full-fleged loggers for use in node, you can use this one instead if you don't | ||
Although there are plenty full-fledged loggers for use in node, you can use this one instead if you don't | ||
need a zillion features, but rather prefer simplicity. | ||
@@ -14,0 +14,0 @@ ___ |
Sorry, the diff of this file is not supported yet
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
42848