custom-log
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -53,3 +53,3 @@ // Generated by CoffeeScript 1.9.1 | ||
if (level === 'log') { | ||
return log.message = message; | ||
return log = new Log(level, message).log; | ||
} else { | ||
@@ -56,0 +56,0 @@ return log[level] = new Log(level, message).log; |
@@ -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.message=n: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((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.2", | ||
"version": "0.1.3", | ||
"description": "A tiny flexible logger", | ||
@@ -5,0 +5,0 @@ "main": "custom-log.min.js", |
Sorry, the diff of this file is not supported yet
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
41900