Comparing version 1.2.0 to 1.3.0
10
bows.js
@@ -55,3 +55,3 @@ (function() { | ||
var logArgs = [logger, msg]; | ||
var logArgs = [logger]; | ||
if (colorsSupported) { | ||
@@ -65,5 +65,7 @@ if(!moduleColorsMap[str]){ | ||
logArgs.push(colorString); | ||
logArgs.push(msg, colorString); | ||
}else{ | ||
logArgs.push(msg); | ||
} | ||
if(arguments.length>1){ | ||
@@ -77,3 +79,3 @@ var args = Array.prototype.slice.call(arguments, 1); | ||
logLevels.forEach(function (f) { | ||
logfn[f] = bind.call(logger[f] || logfn, logArgs); | ||
logfn[f] = bind.apply(logger[f] || logfn, logArgs); | ||
}); | ||
@@ -80,0 +82,0 @@ return logfn; |
@@ -56,2 +56,3 @@ !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.bows=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | ||
var logArgs = [logger]; | ||
if (colorsSupported) { | ||
@@ -65,14 +66,17 @@ if(!moduleColorsMap[str]){ | ||
logfn = bind.call(logger.log, logger, msg, colorString); | ||
logArgs.push(msg, colorString); | ||
}else{ | ||
logArgs.push(msg); | ||
} | ||
logLevels.forEach(function (f) { | ||
logfn[f] = bind.call(logger[f] || logfn, logger, msg, colorString); | ||
}); | ||
} else { | ||
logfn = bind.call(logger.log, logger, msg); | ||
logLevels.forEach(function (f) { | ||
logfn[f] = bind.call(logger[f] || logfn, logger, msg); | ||
}); | ||
if(arguments.length>1){ | ||
var args = Array.prototype.slice.call(arguments, 1); | ||
logArgs = logArgs.concat(args); | ||
} | ||
logfn = bind.apply(logger.log, logArgs); | ||
logLevels.forEach(function (f) { | ||
logfn[f] = bind.apply(logger[f] || logfn, logArgs); | ||
}); | ||
return logfn; | ||
@@ -79,0 +83,0 @@ }; |
@@ -1,1 +0,1 @@ | ||
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n;"undefined"!=typeof window?n=window:"undefined"!=typeof global?n=global:"undefined"!=typeof self&&(n=self),n.bows=e()}}(function(){return function e(n,o,r){function t(f,u){if(!o[f]){if(!n[f]){var l="function"==typeof require&&require;if(!u&&l)return l(f,!0);if(i)return i(f,!0);var d=new Error("Cannot find module '"+f+"'");throw d.code="MODULE_NOT_FOUND",d}var a=o[f]={exports:{}};n[f][0].call(a.exports,function(e){var o=n[f][1][e];return t(o?o:e)},a,a.exports,e,n,o,r)}return o[f].exports}for(var i="function"==typeof require&&require,f=0;f<r.length;f++)t(r[f]);return t}({1:[function(e,n){!function(){function o(){var e,n=!!window.chrome,o=/firefox/i.test(navigator.userAgent);if(o){var r=navigator.userAgent.match(/Firefox\/(\d+\.\d+)/);r&&r[1]&&Number(r[1])&&(e=Number(r[1]))}return n||e>=31}var r=function(){var e=.618033988749895;return a+=e,a%=1,360*a},t="undefined"==typeof window,i=!t&&window.localStorage,f=i.andlogKey||"debug",u=i[f],l=e("andlog"),d=Function.prototype.bind,a=0,c=15,g=function(){},p=i.debugColors||o(),s=null,w=null,v={};w=u&&"/"===u[0]&&new RegExp(u.substring(1,u.length-1));for(var y=["log","debug","warn","error","info"],b=0,h=y.length;h>b;b++)g[y[b]]=g;s=function(e){var n,o,t;if(n=e.slice(0,c),n+=Array(c+3-n.length).join(" ")+"|",w&&!e.match(w))return g;if(!d)return g;if(p){v[e]||(v[e]=r());var i=v[e];n="%c"+n,o="color: hsl("+i+",99%,40%); font-weight: bold",t=d.call(l.log,l,n,o),y.forEach(function(e){t[e]=d.call(l[e]||t,l,n,o)})}else t=d.call(l.log,l,n),y.forEach(function(e){t[e]=d.call(l[e]||t,l,n)});return t},s.config=function(e){e.padLength&&(c=e.padLength)},"undefined"!=typeof n?n.exports=s:window.bows=s}.call()},{andlog:2}],2:[function(e,n,o){!function(){var e="undefined"==typeof window,r=!e&&window.localStorage,t={};if(e)return n.exports=console,void 0;var i=r.andlogKey||"debug";if(r&&r[i]&&window.console)t=window.console;else for(var f="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","),u=f.length,l=function(){};u--;)t[f[u]]=l;"undefined"!=typeof o?n.exports=t:window.console=t}()},{}]},{},[1])(1)}); | ||
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n;"undefined"!=typeof window?n=window:"undefined"!=typeof global?n=global:"undefined"!=typeof self&&(n=self),n.bows=e()}}(function(){return function e(n,o,r){function t(f,u){if(!o[f]){if(!n[f]){var l="function"==typeof require&&require;if(!u&&l)return l(f,!0);if(i)return i(f,!0);var d=new Error("Cannot find module '"+f+"'");throw d.code="MODULE_NOT_FOUND",d}var a=o[f]={exports:{}};n[f][0].call(a.exports,function(e){var o=n[f][1][e];return t(o?o:e)},a,a.exports,e,n,o,r)}return o[f].exports}for(var i="function"==typeof require&&require,f=0;f<r.length;f++)t(r[f]);return t}({1:[function(e,n){!function(){function o(){var e,n=!!window.chrome,o=/firefox/i.test(navigator.userAgent);if(o){var r=navigator.userAgent.match(/Firefox\/(\d+\.\d+)/);r&&r[1]&&Number(r[1])&&(e=Number(r[1]))}return n||e>=31}var r=function(){var e=.618033988749895;return a+=e,a%=1,360*a},t="undefined"==typeof window,i=!t&&window.localStorage,f=i.andlogKey||"debug",u=i[f],l=e("andlog"),d=Function.prototype.bind,a=0,c=15,p=function(){},s=i.debugColors||o(),g=null,w=null,v={};w=u&&"/"===u[0]&&new RegExp(u.substring(1,u.length-1));for(var y=["log","debug","warn","error","info"],h=0,m=y.length;m>h;h++)p[y[h]]=p;g=function(e){var n,o,t;if(n=e.slice(0,c),n+=Array(c+3-n.length).join(" ")+"|",w&&!e.match(w))return p;if(!d)return p;var i=[l];if(s){v[e]||(v[e]=r());var f=v[e];n="%c"+n,o="color: hsl("+f+",99%,40%); font-weight: bold",i.push(n,o)}else i.push(n);if(arguments.length>1){var u=Array.prototype.slice.call(arguments,1);i=i.concat(u)}return t=d.apply(l.log,i),y.forEach(function(e){t[e]=d.apply(l[e]||t,i)}),t},g.config=function(e){e.padLength&&(c=e.padLength)},"undefined"!=typeof n?n.exports=g:window.bows=g}.call()},{andlog:2}],2:[function(e,n,o){!function(){var e="undefined"==typeof window,r=!e&&window.localStorage,t={};if(e)return n.exports=console,void 0;var i=r.andlogKey||"debug";if(r&&r[i]&&window.console)t=window.console;else for(var f="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","),u=f.length,l=function(){};u--;)t[f[u]]=l;"undefined"!=typeof o?n.exports=t:window.console=t}()},{}]},{},[1])(1)}); |
{ | ||
"name": "bows", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "Rainbowed console logs for chrome, opera and firefox in development.", | ||
@@ -5,0 +5,0 @@ "main": "bows.js", |
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
310
84990
24