New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

logdown

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

logdown - npm Package Compare versions

Comparing version 1.2.0 to 1.2.4

2

bower.json
{
"name": "logdown",
"version": "1.1.2",
"version": "1.2.4",
"homepage": "https://github.com/caiogondim/logdown",

@@ -5,0 +5,0 @@ "authors": [

/**
* logdown - Debug utility with markdown support that runs on browser and server
*
* @version v1.1.2
* @version v1.2.4
* @link https://github.com/caiogondim/logdown

@@ -9,2 +9,2 @@ * @author Caio Gondim <me@caiogondim.com> (http://caiogondim.com)

*/
!function(){"use strict";function e(r){if(!(this instanceof e))return new e(r);r=r||{};var o=void 0===r.prefix?"":r.prefix;return o=a(o),o&&s(o,x)?c(o,x):(this.markdown=void 0===r.markdown?!0:r.markdown,this.prefix=o,x.push(this),f()?(this.prefixColor=m[g%m.length],g+=1):u()&&(this.prefixColor=v()),this)}function r(e){for(var r=[],t=o(e);t;)e=e.replace(t.rule.regexp,t.rule.replacer),f()&&(r.push(t.rule.style),r.push("color:inherit;")),t=o(e);return{text:e,styles:r}}function o(e){var r=[],o=[];return f()?o=[{regexp:/\*([^\*]+)\*/,replacer:function(e,r){return"%c"+r+"%c"},style:"font-weight:bold;"},{regexp:/\_([^\_]+)\_/,replacer:function(e,r){return"%c"+r+"%c"},style:"font-style:italic;"},{regexp:/\`([^\`]+)\`/,replacer:function(e,r){return"%c"+r+"%c"},style:"background:#FDF6E3; color:#586E75; padding:1px 5px; border-radius:4px;"}]:u()&&(o=[{regexp:/\*([^\*]+)\*/,replacer:function(e,r){return"["+b.modifiers.bold[0]+"m"+r+"["+b.modifiers.bold[1]+"m"}},{regexp:/\_([^\_]+)\_/,replacer:function(e,r){return"["+b.modifiers.italic[0]+"m"+r+"["+b.modifiers.italic[1]+"m"}},{regexp:/\`([^\`]+)\`/,replacer:function(e,r){return"["+b.bgColors.bgYellow[0]+"m["+b.colors.black[0]+"m "+r+" ["+b.colors.black[1]+"m["+b.bgColors.bgYellow[1]+"m"}}]),o.forEach(function(o){var t=e.match(o.regexp);t&&r.push({rule:o,match:t})}),0===r.length?null:(r.sort(function(e,r){return e.match.index-r.match.index}),r[0])}function t(e,o){var t,n,i,l;return"string"==typeof e?o.markdown&&p()?(t=r(e),n=t.text,i=t.styles):(n=e,i=[]):(n=n||"",i=i||[],l=e),o.prefix&&(p()?(n="%c"+o.prefix+"%c "+n,i.unshift("color:"+o.prefixColor+"; font-weight:bold;","color:inherit;")):n="["+o.prefix+"] "+n),{parsedText:n,styles:i,notText:l}}function n(e,o){var t,n="";return o.prefix&&(n=p()?"["+o.prefixColor[0]+"m["+b.modifiers.bold[0]+"m"+o.prefix+"["+b.modifiers.bold[1]+"m["+o.prefixColor[1]+"m ":"["+o.prefix+"] "),"string"==typeof e?n+=o.markdown?r(e).text:e:t=e,{parsedText:n,styles:[],notText:t}}function i(e){var r=!1;return h.forEach(function(o){"enable"===o.type&&o.regExp.test(e.prefix)?r=!1:"disable"===o.type&&o.regExp.test(e.prefix)&&(r=!0)}),r}function l(e){return new RegExp("^"+e.replace(/\*/g,".*?")+"$")}function s(e,r){var o=!1;return r.forEach(function(r){return r.prefix===e?void(o=!0):void 0}),o}function c(e,r){var o;return r.forEach(function(r){return r.prefix===e?void(o=r):void 0}),o}function a(e){return"string"==typeof e?e.replace(/\%c/g,""):e}function p(){if(f()){var e="WebkitAppearance"in document.documentElement.style,r=window.console&&(console.firebug||console.exception&&console.table),o=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31;return e||r||o}return u()?process.stdout&&!process.stdout.isTTY?!1:"win32"===process.platform?!0:"COLORTERM"in process.env?!0:"dumb"===process.env.TERM?!1:/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)?!0:!1:void 0}function u(){return"undefined"!=typeof module&&"undefined"!=typeof module.exports}function f(){return"undefined"!=typeof window}function d(e){return e}var x=[],g=0,m=["#B58900","#CB4B16","#DC322F","#D33682","#6C71C4","#268BD2","#2AA198","#859900"],b={modifiers:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},colors:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39]},bgColors:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49]}},h=[];e.enable=function(){Array.prototype.forEach.call(arguments,function(r){"-"===r[0]&&e.disable(r.substr(1));var o=l(r);"*"===r?h=[{type:"enable",regExp:o}]:h.push({type:"enable",regExp:o})})},e.disable=function(){Array.prototype.forEach.call(arguments,function(r){"-"===r[0]&&e.enable(r.substr(1));var o=l(r);"*"===r?h=[{type:"disable",regExp:o}]:h.push({type:"disable",regExp:o})})};var y=["log","info","warn","error"];y.forEach(function(r){e.prototype[r]=function(){var e,o=[];if(!i(this)){var l=Array.prototype.slice.call(arguments,0).join(" ");f()?(l=a(l),e=t(l,this),Function.prototype.apply.call(console[r],console,[e.parsedText].concat(e.styles,"undefined"!=typeof e.notText?[e.notText]:""))):u()&&(l=d(l),e=n(l,this),"warn"===r?e.parsedText="["+b.colors.yellow[0]+"m⚠["+b.colors.yellow[1]+"m "+e.parsedText:"error"===r?e.parsedText="["+b.colors.red[0]+"m✖["+b.colors.red[1]+"m "+e.parsedText:"info"===r&&(e.parsedText="["+b.colors.blue[0]+"mℹ["+b.colors.blue[1]+"m "+e.parsedText),o.push(e.parsedText),e.notText&&o.push(e.notText),console[r].apply(console,o))}}});var v=function(){var e=0,r=[[31,39],[32,39],[33,39],[34,39],[35,39],[36,39]];return function(){return r[(e+=1)%r.length]}}();u()?module.exports=e:f()&&(window.Logdown=e)}();
!function(){"use strict";function e(r){if(!(this instanceof e))return new e(r);r=r||{};var o=void 0===r.prefix?"":r.prefix;return o=a(o),o&&c(o,x)?l(o,x):(this.markdown=void 0===r.markdown?!0:r.markdown,this.prefix=o,x.push(this),f()?(this.prefixColor=m[g%m.length],g+=1):u()&&(this.prefixColor=v()),this)}function r(e){for(var r=[],n=o(e);n;)e=e.replace(n.rule.regexp,n.rule.replacer),f()&&(r.push(n.rule.style),r.push("color:inherit;")),n=o(e);return{text:e,styles:r}}function o(e){var r=[],o=[];return f()?o=[{regexp:/\*([^\*]+)\*/,replacer:function(e,r){return"%c"+r+"%c"},style:"font-weight:bold;"},{regexp:/\_([^\_]+)\_/,replacer:function(e,r){return"%c"+r+"%c"},style:"font-style:italic;"},{regexp:/\`([^\`]+)\`/,replacer:function(e,r){return"%c"+r+"%c"},style:"background:#FDF6E3; color:#586E75; padding:1px 5px; border-radius:4px;"}]:u()&&(o=[{regexp:/\*([^\*]+)\*/,replacer:function(e,r){return"["+b.modifiers.bold[0]+"m"+r+"["+b.modifiers.bold[1]+"m"}},{regexp:/\_([^\_]+)\_/,replacer:function(e,r){return"["+b.modifiers.italic[0]+"m"+r+"["+b.modifiers.italic[1]+"m"}},{regexp:/\`([^\`]+)\`/,replacer:function(e,r){return"["+b.bgColors.bgYellow[0]+"m["+b.colors.black[0]+"m "+r+" ["+b.colors.black[1]+"m["+b.bgColors.bgYellow[1]+"m"}}]),o.forEach(function(o){var n=e.match(o.regexp);n&&r.push({rule:o,match:n})}),0===r.length?null:(r.sort(function(e,r){return e.match.index-r.match.index}),r[0])}function n(e,o){var n,t,i,s;return"string"==typeof e?o.markdown&&p()?(n=r(e),t=n.text,i=n.styles):(t=e,i=[]):(t=t||"",i=i||[],s=e),o.prefix&&(p()?(t="%c"+o.prefix+"%c "+t,i.unshift("color:"+o.prefixColor+"; font-weight:bold;","color:inherit;")):t="["+o.prefix+"] "+t),{parsedText:t,styles:i,notText:s}}function t(e,o){var n,t="";return o.prefix&&(t=p()?"["+o.prefixColor[0]+"m["+b.modifiers.bold[0]+"m"+o.prefix+"["+b.modifiers.bold[1]+"m["+o.prefixColor[1]+"m ":"["+o.prefix+"] "),"string"==typeof e?t+=o.markdown?r(e).text:e:n=e,{parsedText:t,styles:[],notText:n}}function i(r){var o=null;"undefined"!=typeof process&&void 0!==process.env&&0===h.length&&(void 0!==process.env.NODE_DEBUG&&""!==process.env.NODE_DEBUG?o="NODE_DEBUG":void 0!==process.env.DEBUG&&""!==process.env.DEBUG&&(o="DEBUG"),o&&(e.disable("*"),process.env[o].split(",").forEach(function(r){e.enable(r)})));var n=!1;return h.forEach(function(e){"enable"===e.type&&e.regExp.test(r.prefix)?n=!1:"disable"===e.type&&e.regExp.test(r.prefix)&&(n=!0)}),n}function s(e){return new RegExp("^"+e.replace(/\*/g,".*?")+"$")}function c(e,r){var o=!1;return r.forEach(function(r){return r.prefix===e?void(o=!0):void 0}),o}function l(e,r){var o;return r.forEach(function(r){return r.prefix===e?void(o=r):void 0}),o}function a(e){return"string"==typeof e?e.replace(/\%c/g,""):e}function p(){if(f()){var e="WebkitAppearance"in document.documentElement.style,r=window.console&&(console.firebug||console.exception&&console.table),o=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31;return e||r||o}return u()?process.stdout&&!process.stdout.isTTY?!1:"win32"===process.platform?!0:"COLORTERM"in process.env?!0:"dumb"===process.env.TERM?!1:/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)?!0:!1:void 0}function u(){return"undefined"!=typeof module&&"undefined"!=typeof module.exports}function f(){return"undefined"!=typeof window}function d(e){return e}var x=[],g=0,m=["#B58900","#CB4B16","#DC322F","#D33682","#6C71C4","#268BD2","#2AA198","#859900"],b={modifiers:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},colors:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39]},bgColors:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49]}},h=[];e.enable=function(){Array.prototype.forEach.call(arguments,function(r){"-"===r[0]&&e.disable(r.substr(1));var o=s(r);"*"===r?h=[]:h.push({type:"enable",regExp:o})})},e.disable=function(){Array.prototype.forEach.call(arguments,function(r){"-"===r[0]&&e.enable(r.substr(1));var o=s(r);"*"===r?h=[{type:"disable",regExp:o}]:h.push({type:"disable",regExp:o})})};var y=["debug","log","info","warn","error"];y.forEach(function(r){e.prototype[r]=function(){var e,o=[];if(!i(this)){var s=Array.prototype.slice.call(arguments,0).join(" ");f()?(s=a(s),e=n(s,this),Function.prototype.apply.call(console[r]||console.log,console,[e.parsedText].concat(e.styles,"undefined"!=typeof e.notText?[e.notText]:""))):u()&&(s=d(s),e=t(s,this),"warn"===r?e.parsedText="["+b.colors.yellow[0]+"m⚠["+b.colors.yellow[1]+"m "+e.parsedText:"error"===r?e.parsedText="["+b.colors.red[0]+"m✖["+b.colors.red[1]+"m "+e.parsedText:"info"===r?e.parsedText="["+b.colors.blue[0]+"mℹ["+b.colors.blue[1]+"m "+e.parsedText:"debug"===r&&(e.parsedText="["+b.colors.gray[0]+"m🐛["+b.colors.gray[1]+"m "+e.parsedText),o.push(e.parsedText),e.notText&&o.push(e.notText),(console[r]||console.log).apply(console,o))}}});var v=function(){var e=0,r=[[31,39],[32,39],[33,39],[34,39],[35,39],[36,39]];return function(){return r[(e+=1)%r.length]}}();u()?module.exports=e:f()&&(window.Logdown=e)}();
/**
* logdown - Debug utility with markdown support that runs on browser and server
*
* @version v1.1.2
* @version v1.2.4
* @link https://github.com/caiogondim/logdown

@@ -9,2 +9,2 @@ * @author Caio Gondim <me@caiogondim.com> (http://caiogondim.com)

*/
!function(){"use strict";function e(r){if(!(this instanceof e))return new e(r);r=r||{};var o=void 0===r.prefix?"":r.prefix;return o=a(o),o&&s(o,x)?c(o,x):(this.markdown=void 0===r.markdown?!0:r.markdown,this.prefix=o,x.push(this),f()?(this.prefixColor=m[g%m.length],g+=1):u()&&(this.prefixColor=v()),this)}function r(e){for(var r=[],t=o(e);t;)e=e.replace(t.rule.regexp,t.rule.replacer),f()&&(r.push(t.rule.style),r.push("color:inherit;")),t=o(e);return{text:e,styles:r}}function o(e){var r=[],o=[];return f()?o=[{regexp:/\*([^\*]+)\*/,replacer:function(e,r){return"%c"+r+"%c"},style:"font-weight:bold;"},{regexp:/\_([^\_]+)\_/,replacer:function(e,r){return"%c"+r+"%c"},style:"font-style:italic;"},{regexp:/\`([^\`]+)\`/,replacer:function(e,r){return"%c"+r+"%c"},style:"background:#FDF6E3; color:#586E75; padding:1px 5px; border-radius:4px;"}]:u()&&(o=[{regexp:/\*([^\*]+)\*/,replacer:function(e,r){return"["+b.modifiers.bold[0]+"m"+r+"["+b.modifiers.bold[1]+"m"}},{regexp:/\_([^\_]+)\_/,replacer:function(e,r){return"["+b.modifiers.italic[0]+"m"+r+"["+b.modifiers.italic[1]+"m"}},{regexp:/\`([^\`]+)\`/,replacer:function(e,r){return"["+b.bgColors.bgYellow[0]+"m["+b.colors.black[0]+"m "+r+" ["+b.colors.black[1]+"m["+b.bgColors.bgYellow[1]+"m"}}]),o.forEach(function(o){var t=e.match(o.regexp);t&&r.push({rule:o,match:t})}),0===r.length?null:(r.sort(function(e,r){return e.match.index-r.match.index}),r[0])}function t(e,o){var t,n,i,l;return"string"==typeof e?o.markdown&&p()?(t=r(e),n=t.text,i=t.styles):(n=e,i=[]):(n=n||"",i=i||[],l=e),o.prefix&&(p()?(n="%c"+o.prefix+"%c "+n,i.unshift("color:"+o.prefixColor+"; font-weight:bold;","color:inherit;")):n="["+o.prefix+"] "+n),{parsedText:n,styles:i,notText:l}}function n(e,o){var t,n="";return o.prefix&&(n=p()?"["+o.prefixColor[0]+"m["+b.modifiers.bold[0]+"m"+o.prefix+"["+b.modifiers.bold[1]+"m["+o.prefixColor[1]+"m ":"["+o.prefix+"] "),"string"==typeof e?n+=o.markdown?r(e).text:e:t=e,{parsedText:n,styles:[],notText:t}}function i(e){var r=!1;return h.forEach(function(o){"enable"===o.type&&o.regExp.test(e.prefix)?r=!1:"disable"===o.type&&o.regExp.test(e.prefix)&&(r=!0)}),r}function l(e){return new RegExp("^"+e.replace(/\*/g,".*?")+"$")}function s(e,r){var o=!1;return r.forEach(function(r){return r.prefix===e?void(o=!0):void 0}),o}function c(e,r){var o;return r.forEach(function(r){return r.prefix===e?void(o=r):void 0}),o}function a(e){return"string"==typeof e?e.replace(/\%c/g,""):e}function p(){if(f()){var e="WebkitAppearance"in document.documentElement.style,r=window.console&&(console.firebug||console.exception&&console.table),o=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31;return e||r||o}return u()?process.stdout&&!process.stdout.isTTY?!1:"win32"===process.platform?!0:"COLORTERM"in process.env?!0:"dumb"===process.env.TERM?!1:/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)?!0:!1:void 0}function u(){return"undefined"!=typeof module&&"undefined"!=typeof module.exports}function f(){return"undefined"!=typeof window}function d(e){return e}var x=[],g=0,m=["#B58900","#CB4B16","#DC322F","#D33682","#6C71C4","#268BD2","#2AA198","#859900"],b={modifiers:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},colors:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39]},bgColors:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49]}},h=[];e.enable=function(){Array.prototype.forEach.call(arguments,function(r){"-"===r[0]&&e.disable(r.substr(1));var o=l(r);"*"===r?h=[{type:"enable",regExp:o}]:h.push({type:"enable",regExp:o})})},e.disable=function(){Array.prototype.forEach.call(arguments,function(r){"-"===r[0]&&e.enable(r.substr(1));var o=l(r);"*"===r?h=[{type:"disable",regExp:o}]:h.push({type:"disable",regExp:o})})};var y=["log","info","warn","error"];y.forEach(function(r){e.prototype[r]=function(){var e,o=[];if(!i(this)){var l=Array.prototype.slice.call(arguments,0).join(" ");f()?(l=a(l),e=t(l,this),Function.prototype.apply.call(console[r],console,[e.parsedText].concat(e.styles,"undefined"!=typeof e.notText?[e.notText]:""))):u()&&(l=d(l),e=n(l,this),"warn"===r?e.parsedText="["+b.colors.yellow[0]+"m⚠["+b.colors.yellow[1]+"m "+e.parsedText:"error"===r?e.parsedText="["+b.colors.red[0]+"m✖["+b.colors.red[1]+"m "+e.parsedText:"info"===r&&(e.parsedText="["+b.colors.blue[0]+"mℹ["+b.colors.blue[1]+"m "+e.parsedText),o.push(e.parsedText),e.notText&&o.push(e.notText),console[r].apply(console,o))}}});var v=function(){var e=0,r=[[31,39],[32,39],[33,39],[34,39],[35,39],[36,39]];return function(){return r[(e+=1)%r.length]}}();u()?module.exports=e:f()&&(window.Logdown=e)}();
!function(){"use strict";function e(r){if(!(this instanceof e))return new e(r);r=r||{};var o=void 0===r.prefix?"":r.prefix;return o=a(o),o&&c(o,x)?l(o,x):(this.markdown=void 0===r.markdown?!0:r.markdown,this.prefix=o,x.push(this),f()?(this.prefixColor=m[g%m.length],g+=1):u()&&(this.prefixColor=v()),this)}function r(e){for(var r=[],n=o(e);n;)e=e.replace(n.rule.regexp,n.rule.replacer),f()&&(r.push(n.rule.style),r.push("color:inherit;")),n=o(e);return{text:e,styles:r}}function o(e){var r=[],o=[];return f()?o=[{regexp:/\*([^\*]+)\*/,replacer:function(e,r){return"%c"+r+"%c"},style:"font-weight:bold;"},{regexp:/\_([^\_]+)\_/,replacer:function(e,r){return"%c"+r+"%c"},style:"font-style:italic;"},{regexp:/\`([^\`]+)\`/,replacer:function(e,r){return"%c"+r+"%c"},style:"background:#FDF6E3; color:#586E75; padding:1px 5px; border-radius:4px;"}]:u()&&(o=[{regexp:/\*([^\*]+)\*/,replacer:function(e,r){return"["+b.modifiers.bold[0]+"m"+r+"["+b.modifiers.bold[1]+"m"}},{regexp:/\_([^\_]+)\_/,replacer:function(e,r){return"["+b.modifiers.italic[0]+"m"+r+"["+b.modifiers.italic[1]+"m"}},{regexp:/\`([^\`]+)\`/,replacer:function(e,r){return"["+b.bgColors.bgYellow[0]+"m["+b.colors.black[0]+"m "+r+" ["+b.colors.black[1]+"m["+b.bgColors.bgYellow[1]+"m"}}]),o.forEach(function(o){var n=e.match(o.regexp);n&&r.push({rule:o,match:n})}),0===r.length?null:(r.sort(function(e,r){return e.match.index-r.match.index}),r[0])}function n(e,o){var n,t,i,s;return"string"==typeof e?o.markdown&&p()?(n=r(e),t=n.text,i=n.styles):(t=e,i=[]):(t=t||"",i=i||[],s=e),o.prefix&&(p()?(t="%c"+o.prefix+"%c "+t,i.unshift("color:"+o.prefixColor+"; font-weight:bold;","color:inherit;")):t="["+o.prefix+"] "+t),{parsedText:t,styles:i,notText:s}}function t(e,o){var n,t="";return o.prefix&&(t=p()?"["+o.prefixColor[0]+"m["+b.modifiers.bold[0]+"m"+o.prefix+"["+b.modifiers.bold[1]+"m["+o.prefixColor[1]+"m ":"["+o.prefix+"] "),"string"==typeof e?t+=o.markdown?r(e).text:e:n=e,{parsedText:t,styles:[],notText:n}}function i(r){var o=null;"undefined"!=typeof process&&void 0!==process.env&&0===h.length&&(void 0!==process.env.NODE_DEBUG&&""!==process.env.NODE_DEBUG?o="NODE_DEBUG":void 0!==process.env.DEBUG&&""!==process.env.DEBUG&&(o="DEBUG"),o&&(e.disable("*"),process.env[o].split(",").forEach(function(r){e.enable(r)})));var n=!1;return h.forEach(function(e){"enable"===e.type&&e.regExp.test(r.prefix)?n=!1:"disable"===e.type&&e.regExp.test(r.prefix)&&(n=!0)}),n}function s(e){return new RegExp("^"+e.replace(/\*/g,".*?")+"$")}function c(e,r){var o=!1;return r.forEach(function(r){return r.prefix===e?void(o=!0):void 0}),o}function l(e,r){var o;return r.forEach(function(r){return r.prefix===e?void(o=r):void 0}),o}function a(e){return"string"==typeof e?e.replace(/\%c/g,""):e}function p(){if(f()){var e="WebkitAppearance"in document.documentElement.style,r=window.console&&(console.firebug||console.exception&&console.table),o=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31;return e||r||o}return u()?process.stdout&&!process.stdout.isTTY?!1:"win32"===process.platform?!0:"COLORTERM"in process.env?!0:"dumb"===process.env.TERM?!1:/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)?!0:!1:void 0}function u(){return"undefined"!=typeof module&&"undefined"!=typeof module.exports}function f(){return"undefined"!=typeof window}function d(e){return e}var x=[],g=0,m=["#B58900","#CB4B16","#DC322F","#D33682","#6C71C4","#268BD2","#2AA198","#859900"],b={modifiers:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},colors:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39]},bgColors:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49]}},h=[];e.enable=function(){Array.prototype.forEach.call(arguments,function(r){"-"===r[0]&&e.disable(r.substr(1));var o=s(r);"*"===r?h=[]:h.push({type:"enable",regExp:o})})},e.disable=function(){Array.prototype.forEach.call(arguments,function(r){"-"===r[0]&&e.enable(r.substr(1));var o=s(r);"*"===r?h=[{type:"disable",regExp:o}]:h.push({type:"disable",regExp:o})})};var y=["debug","log","info","warn","error"];y.forEach(function(r){e.prototype[r]=function(){var e,o=[];if(!i(this)){var s=Array.prototype.slice.call(arguments,0).join(" ");f()?(s=a(s),e=n(s,this),Function.prototype.apply.call(console[r]||console.log,console,[e.parsedText].concat(e.styles,"undefined"!=typeof e.notText?[e.notText]:""))):u()&&(s=d(s),e=t(s,this),"warn"===r?e.parsedText="["+b.colors.yellow[0]+"m⚠["+b.colors.yellow[1]+"m "+e.parsedText:"error"===r?e.parsedText="["+b.colors.red[0]+"m✖["+b.colors.red[1]+"m "+e.parsedText:"info"===r?e.parsedText="["+b.colors.blue[0]+"mℹ["+b.colors.blue[1]+"m "+e.parsedText:"debug"===r&&(e.parsedText="["+b.colors.gray[0]+"m🐛["+b.colors.gray[1]+"m "+e.parsedText),o.push(e.parsedText),e.notText&&o.push(e.notText),(console[r]||console.log).apply(console,o))}}});var v=function(){var e=0,r=[[31,39],[32,39],[33,39],[34,39],[35,39],[36,39]];return function(){return r[(e+=1)%r.length]}}();u()?module.exports=e:f()&&(window.Logdown=e)}();

@@ -14,2 +14,6 @@ /* jshint node:true */

var karma = require('karma').server
var bump = require('gulp-bump')
var runSequence = require('run-sequence')
var tagVersion = require('gulp-tag-version')
var git = require('gulp-git')

@@ -62,15 +66,15 @@ // Test

var pkg = require('./package.json')
var banner = [
'/**',
' * <%= pkg.name %> - <%= pkg.description %>',
' *',
' * @version v<%= pkg.version %>',
' * @link <%= pkg.homepage %>',
' * @author <%= pkg.author %>',
' * @license <%= pkg.license %>',
' */',
''].join('\n');
gulp.task('build', function() {
var pkg = require('./package.json')
var banner = [
'/**',
' * <%= pkg.name %> - <%= pkg.description %>',
' *',
' * @version v<%= pkg.version %>',
' * @link <%= pkg.homepage %>',
' * @author <%= pkg.author %>',
' * @license <%= pkg.license %>',
' */',
''].join('\n');
gulp.task('build', function() {
gulp.src('src/index.js')

@@ -93,1 +97,40 @@ .pipe(uglify())

})
// Release
// -------
gulp.task('tag-version', function() {
gulp.src(['./package.json'])
.pipe(git.commit('Version bump'))
.pipe(tagVersion())
})
gulp.task('bump:major', function() {
return gulp.src(['package.json', 'bower.json'])
.pipe(bump({type: 'major'}))
.pipe(gulp.dest('./'))
})
gulp.task('bump:minor', function() {
return gulp.src(['package.json', 'bower.json'])
.pipe(bump({type: 'minor'}))
.pipe(gulp.dest('./'))
})
gulp.task('bump:patch', function() {
return gulp.src(['package.json', 'bower.json'])
.pipe(bump({type: 'patch'}))
.pipe(gulp.dest('./'))
})
gulp.task('release:major', function(callback) {
runSequence('bump:major', 'build', 'tag-version', callback)
})
gulp.task('release:minor', function(callback) {
runSequence('bump:minor', 'build', 'tag-version', callback)
})
gulp.task('release:patch', function(callback) {
runSequence('bump:patch', 'build', 'tag-version', callback)
})
{
"name": "logdown",
"version": "1.2.0",
"version": "1.2.4",
"description": "Debug utility with markdown support that runs on browser and server",

@@ -13,3 +13,6 @@ "main": "dist/index.js",

"deploy:example": "gulp deploy:example",
"test:travisci": "gulp test:travisci"
"test:travisci": "gulp test:travisci",
"release:major": "gulp release:major",
"release:minor": "gulp release:minor",
"release:patch": "gulp release:patch"
},

@@ -38,3 +41,5 @@ "repository": {

"gulp": "^3.8.11",
"gulp-bump": "^0.3.1",
"gulp-gh-pages": "^0.5.0",
"gulp-git": "^1.2.4",
"gulp-header": "^1.2.2",

@@ -45,2 +50,3 @@ "gulp-jscs": "^1.4.0",

"gulp-rename": "^1.2.0",
"gulp-tag-version": "^1.2.1",
"gulp-uglify": "^1.1.0",

@@ -58,4 +64,5 @@ "jshint-stylish": "^1.0.0",

"mocha": "^2.1.0",
"run-sequence": "^1.1.1",
"sinon": "^1.12.2"
}
}

@@ -134,3 +134,3 @@ /* global console, module, window, document, navigator, process */

var methods = ['log', 'info', 'warn', 'error']
var methods = ['debug', 'log', 'info', 'warn', 'error']
methods.forEach(function(method) {

@@ -156,3 +156,3 @@ Logdown.prototype[method] = function() {

Function.prototype.apply.call(
console[method],
console[method] || console.log,
console,

@@ -186,2 +186,8 @@ [preparedOutput.parsedText]

preparedOutput.parsedText
} else if (method === 'debug') {
preparedOutput.parsedText =
'\u001b[' + ansiColors.colors.gray[0] + 'm' +
'🐛' +
'\u001b[' + ansiColors.colors.gray[1] + 'm ' +
preparedOutput.parsedText
}

@@ -195,3 +201,3 @@

console[method].apply(
(console[method] || console.log).apply(
console,

@@ -198,0 +204,0 @@ args

@@ -12,3 +12,3 @@ /* global describe, afterEach, beforeEach, console, it, require, window,

var methods = ['log', 'info', 'warn', 'error']
var methods = ['debug', 'log', 'info', 'warn', 'error']
methods.forEach(function(method) {

@@ -15,0 +15,0 @@ describe('Logdown::' + method, function() {

@@ -47,3 +47,3 @@ /* global describe, it, beforeEach, afterEach, xit */

var methods = ['log', 'info', 'warn', 'error']
var methods = ['debug', 'log', 'info', 'warn', 'error']
methods.forEach(function(method) {

@@ -54,4 +54,9 @@ describe('Logdown::' + method, function() {

if (method === 'info') {
if (method === 'debug') {
symbol =
'\u001b[' + ansiColors.colors.gray[0] + 'm' +
'🐛' +
'\u001b[' + ansiColors.colors.gray[1] + 'm '
} else if (method === 'info') {
symbol =
'\u001b[' + ansiColors.colors.blue[0] + 'm' +

@@ -73,2 +78,3 @@ 'ℹ' +

beforeEach(function() {
global.console[method] = global.console[method] || global.console.log;
sandbox = sinon.sandbox.create()

@@ -75,0 +81,0 @@ sandbox.stub(global.console, method)

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