Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

acho

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

acho - npm Package Compare versions

Comparing version 2.3.0 to 2.4.0

2

bower.json
{
"name": "acho",
"description": "An extremely simple (but powerful) logging system for NodeJS and browser.",
"version": "2.3.0",
"version": "2.4.0",
"authors": [

@@ -6,0 +6,0 @@ "Kiko Beats josefrancisco.verdu@gmail.com"

@@ -0,1 +1,13 @@

<a name="2.4.0"></a>
# 2.4.0 (2015-11-17)
* added string interpolation support ([f3c7623](https://github.com/kikobeats/acho/commit/f3c7623))
* better gif 💅 ([adae687](https://github.com/kikobeats/acho/commit/adae687))
* fixed disabled colors param ([ab7fd74](https://github.com/kikobeats/acho/commit/ab7fd74))
* fixed extra space with diff param ([f358e5b](https://github.com/kikobeats/acho/commit/f358e5b))
* updated library preview 💪 ([e207335](https://github.com/kikobeats/acho/commit/e207335))
<a name="2.3.0"></a>

@@ -5,2 +17,3 @@ # 2.3.0 (2015-10-16)

* 2.3.0 releases ([1453d16](https://github.com/kikobeats/acho/commit/1453d16))
* added experimental .align & .timestamp params ([0a4214f](https://github.com/kikobeats/acho/commit/0a4214f))

@@ -7,0 +20,0 @@ * possibility to decide where put diff in the output ([bb03a48](https://github.com/kikobeats/acho/commit/bb03a48))

/**
* acho - An extremely simple (but powerful) logging system for NodeJS and browser.
* @version v2.3.0
* @version v2.4.0
* @link https://github.com/Kikobeats/acho
* @license MIT
*/!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.Acho=e()}}(function(){return function e(t,r,n){function o(i,u){if(!r[i]){if(!t[i]){var c="function"==typeof require&&require;if(!u&&c)return c(i,!0);if(s)return s(i,!0);var l=new Error("Cannot find module '"+i+"'");throw l.code="MODULE_NOT_FOUND",l}var a=r[i]={exports:{}};t[i][0].call(a.exports,function(e){var r=t[i][1][e];return o(r?r:e)},a,a.exports,e,t,r,n)}return r[i].exports}for(var s="function"==typeof require&&require,i=0;i<n.length;i++)o(n[i]);return o}({1:[function(e,t,r){(function(r){"use strict";var n,o,s;s=e("chalk"),o=e("./Default"),t.exports=n=function(){function e(e){null==e&&(e={}),this.keyword=e.keyword,this.align=null!=e.align?e.align:o.ALIGN,(e.diff||o.DIFF)&&(this.timestamp=[]),this.outputType=e.outputType||o.OUTPUT_TYPE,this.color=e.color||o.COLOR,this.level=e.level||o.UNMUTED,this.types=e.types||o.TYPES,this.transport=e.transport||o.TRANSPORT,this.outputMessage=e.outputMessage||o.OUTPUT_MESSAGE,this.generateMessage=e.generateMessage||o.GENERATE_MESSAGE,this.generateTypeMessage=e.generateTypeMessage||o.GENERATE_TYPE_MESSAGE,this.print=e.print||o.PRINT,this.messages=function(t){return function(){var r,n,o;r={};for(o in t.types)r[o]=(null!=(n=e.messages)?n[o]:void 0)||[],"line"!==o&&(t[o]=t.generateTypeMessage(o));return r}}(this)()}return e.prototype.push=function(e,t){return this.messages[e].push(t),this},e.prototype.add=function(e,t){return this[e](t),this.push(e,t),this},e.prototype.colorize=function(e,t){var n,o,i,u,c;if(!this.color||"production"===("undefined"!=typeof r&&null!==r&&null!=(u=r.env.NODE_ENV)?u.toLowerCase():void 0))return t;for(e=e.split(" "),c=s,o=0,i=e.length;i>o;o++)n=e[o],c=c[n];return c(t)},e.prototype.isPrintable=function(e){return this.level===o.UNMUTED?!0:this.level===o.MUTED?!1:this.types[e].level<=this.types[this.level].level},e}()}).call(this,e("_process"))},{"./Default":2,_process:4,chalk:5}],2:[function(e,t,r){"use strict";var n;n=e("pretty-ms"),t.exports={PRINT:function(){var e,t,r;t=[];for(r in this.types)t.push(function(){var t,n,o,s;for(o=this.messages[r],s=[],t=0,n=o.length;n>t;t++)e=o[t],s.push(this.transport(this.generateMessage(r,e)));return s}.call(this));return t},OUTPUT_MESSAGE:function(e){return e},OUTPUT_TYPE:function(e,t){return null==t&&(t=""),this.align&&!this.timestamp?""+t+e+" ":""+t+e+" "},TRANSPORT:console.log,GENERATE_MESSAGE:function(e,t){var r,o,s;if(this.isPrintable(e))return r=this.types[e].color,t=this.outputMessage(t),t=this.colorize(this.types.line.color,t),this.timestamp?this.timestamp[e]?(o=new Date-this.timestamp[e],o=o>1e4?n(o):o+"ms",this.timestamp[e]=new Date,s=this.outputType(this.keyword||e," +"+o)):(this.timestamp[e]=new Date,s=this.outputType(this.keyword||e)):s=this.outputType(this.keyword||e),s=this.colorize(r,s),s+t},GENERATE_TYPE_MESSAGE:function(e){return function(t){return function(r){return t.transport(t.generateMessage(e,r)),t}}(this)},DIFF:!1,ALIGN:!0,COLOR:!0,UNMUTED:"all",MUTED:"silent",TYPES:{line:{color:"gray"},error:{level:0,color:"red"},warn:{level:1,color:"yellow"},success:{level:2,color:"green"},info:{level:3,color:"white"},verbose:{level:4,color:"cyan"},debug:{level:5,color:"blue"},silly:{level:6,color:"magenta"}}}},{"pretty-ms":13}],3:[function(e,t,r){},{}],4:[function(e,t,r){function n(){a=!1,u.length?l=u.concat(l):f=-1,l.length&&o()}function o(){if(!a){var e=setTimeout(n);a=!0;for(var t=l.length;t;){for(u=l,l=[];++f<t;)u[f].run();f=-1,t=l.length}u=null,a=!1,clearTimeout(e)}}function s(e,t){this.fun=e,this.array=t}function i(){}var u,c=t.exports={},l=[],a=!1,f=-1;c.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new s(e,t)),1!==l.length||a||setTimeout(o,0)},s.prototype.run=function(){this.fun.apply(null,this.array)},c.title="browser",c.browser=!0,c.env={},c.argv=[],c.version="",c.versions={},c.on=i,c.addListener=i,c.once=i,c.off=i,c.removeListener=i,c.removeAllListeners=i,c.emit=i,c.binding=function(e){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(e){throw new Error("process.chdir is not supported")},c.umask=function(){return 0}},{}],5:[function(e,t,r){(function(r){"use strict";function n(e){this.enabled=e&&void 0!==e.enabled?e.enabled:f}function o(e){var t=function r(){return s.apply(r,arguments)};return t._styles=e,t.enabled=this.enabled,t.__proto__=g,t}function s(){var e=arguments,t=e.length,r=0!==t&&String(arguments[0]);if(t>1)for(var n=1;t>n;n++)r+=" "+e[n];if(!this.enabled||!r)return r;for(var o=this._styles,s=o.length;s--;){var i=c[o[s]];r=i.open+r.replace(i.closeRe,i.open)+i.close}return r}function i(){var e={};return Object.keys(h).forEach(function(t){e[t]={get:function(){return o.call(this,[t])}}}),e}var u=e("escape-string-regexp"),c=e("ansi-styles"),l=e("strip-ansi"),a=e("has-ansi"),f=e("supports-color"),p=Object.defineProperties;"win32"===r.platform&&(c.blue.open="");var h=function(){var e={};return Object.keys(c).forEach(function(t){c[t].closeRe=new RegExp(u(c[t].close),"g"),e[t]={get:function(){return o.call(this,this._styles.concat(t))}}}),e}(),g=p(function(){},h);p(n.prototype,i()),t.exports=new n,t.exports.styles=c,t.exports.hasColor=a,t.exports.stripColor=l,t.exports.supportsColor=f}).call(this,e("_process"))},{_process:4,"ansi-styles":6,"escape-string-regexp":7,"has-ansi":8,"strip-ansi":10,"supports-color":12}],6:[function(e,t,r){"use strict";var n=t.exports={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]}};n.colors.grey=n.colors.gray,Object.keys(n).forEach(function(e){var t=n[e];Object.keys(t).forEach(function(e){var r=t[e];n[e]=t[e]={open:"["+r[0]+"m",close:"["+r[1]+"m"}}),Object.defineProperty(n,e,{value:t,enumerable:!1})})},{}],7:[function(e,t,r){"use strict";var n=/[|\\{}()[\]^$+*?.]/g;t.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(n,"\\$&")}},{}],8:[function(e,t,r){"use strict";var n=e("ansi-regex"),o=new RegExp(n().source);t.exports=o.test.bind(o)},{"ansi-regex":9}],9:[function(e,t,r){"use strict";t.exports=function(){return/(?:(?:\u001b\[)|\u009b)(?:(?:[0-9]{1,3})?(?:(?:;[0-9]{0,3})*)?[A-M|f-m])|\u001b[A-M]/g}},{}],10:[function(e,t,r){"use strict";var n=e("ansi-regex")();t.exports=function(e){return"string"==typeof e?e.replace(n,""):e}},{"ansi-regex":11}],11:[function(e,t,r){arguments[4][9][0].apply(r,arguments)},{dup:9}],12:[function(e,t,r){(function(e){"use strict";var r=e.argv;t.exports=function(){return"FORCE_COLOR"in e.env?!0:-1!==r.indexOf("--no-color")||-1!==r.indexOf("--no-colors")||-1!==r.indexOf("--color=false")?!1:-1!==r.indexOf("--color")||-1!==r.indexOf("--colors")||-1!==r.indexOf("--color=true")||-1!==r.indexOf("--color=always")?!0:e.stdout&&!e.stdout.isTTY?!1:"win32"===e.platform?!0:"COLORTERM"in e.env?!0:"dumb"===e.env.TERM?!1:/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(e.env.TERM)?!0:!1}()}).call(this,e("_process"))},{_process:4}],13:[function(e,t,r){"use strict";var n=e("parse-ms"),o=e("plur"),s=e("is-finite");t.exports=function(e,t){if(!s(e))throw new TypeError("Expected a finite number");if(t=t||{},1e3>e)return Math.ceil(e)+(t.verbose?" "+o("millisecond",Math.ceil(e)):"ms");var r=[],i=function(e,n,s,i){if(0!==e){var u=t.verbose?" "+o(n,e):s;r.push((i||e)+u)}},u=n(e);if(i(u.days,"day","d"),i(u.hours,"hour","h"),i(u.minutes,"minute","m"),t.compact)return i(u.seconds,"second","s"),"~"+r[0];var c=e/1e3%60,l="number"==typeof t.secDecimalDigits?t.secDecimalDigits:1,a=c.toFixed(l).replace(/\.0$/,"");return i(c,"second","s",a),r.join(" ")}},{"is-finite":14,"parse-ms":16,plur:17}],14:[function(e,t,r){"use strict";var n=e("number-is-nan");t.exports=Number.isFinite||function(e){return!("number"!=typeof e||n(e)||e===1/0||e===-(1/0))}},{"number-is-nan":15}],15:[function(e,t,r){"use strict";t.exports=Number.isNaN||function(e){return e!==e}},{}],16:[function(e,t,r){"use strict";t.exports=function(e){if("number"!=typeof e)throw new TypeError("Expected a number");return{days:Math.floor(e/864e5),hours:Math.floor(e/36e5%24),minutes:Math.floor(e/6e4%60),seconds:Math.floor(e/1e3%60),milliseconds:Math.floor(e%1e3)}}},{}],17:[function(e,t,r){"use strict";t.exports=function(e,t,r){return"number"==typeof t&&(r=t,t=e+"s"),1===r?e:t}},{}],Acho:[function(e,t,r){"use strict";e("coffee-script/register"),t.exports=e("./lib/Acho")},{"./lib/Acho":1,"coffee-script/register":3}]},{},[])("Acho")});
*/!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.Acho=e()}}(function(){return function e(t,r,n){function s(i,u){if(!r[i]){if(!t[i]){var a="function"==typeof require&&require;if(!u&&a)return a(i,!0);if(o)return o(i,!0);var l=new Error("Cannot find module '"+i+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[i]={exports:{}};t[i][0].call(c.exports,function(e){var r=t[i][1][e];return s(r?r:e)},c,c.exports,e,t,r,n)}return r[i].exports}for(var o="function"==typeof require&&require,i=0;i<n.length;i++)s(n[i]);return s}({1:[function(e,t,r){(function(r){"use strict";var n,s,o,i,u=[].slice;o=e("chalk"),s=e("./Default"),i=e("format-util"),t.exports=n=function(){function e(e){null==e&&(e={}),this.keyword=e.keyword,this.align=null!=e.align?e.align:s.ALIGN,(e.diff||s.DIFF)&&(this.timestamp=[]),this.outputType=e.outputType||s.OUTPUT_TYPE,this.color=null!=e.color?e.color:s.COLOR,this.level=e.level||s.UNMUTED,this.types=e.types||s.TYPES,this.transport=e.transport||s.TRANSPORT,this.outputMessage=e.outputMessage||s.OUTPUT_MESSAGE,this.generateMessage=e.generateMessage||s.GENERATE_MESSAGE,this.generateTypeMessage=e.generateTypeMessage||s.GENERATE_TYPE_MESSAGE,this.print=e.print||s.PRINT,this.messages=function(t){return function(){var r,n,s;r={};for(s in t.types)r[s]=(null!=(n=e.messages)?n[s]:void 0)||[],"line"!==s&&(t[s]=t.generateTypeMessage(s));return r}}(this)()}return e.prototype.push=function(){var e,t,r;return r=arguments[0],t=2<=arguments.length?u.call(arguments,1):[],e=this._format(t),this.messages[r].push(e),this},e.prototype.add=function(){var e,t,r;return r=arguments[0],t=2<=arguments.length?u.call(arguments,1):[],e=this._format(t),this[r](e),this.push(r,e),this},e.prototype.colorize=function(e,t){var n,s,i,u,a;if(!this.color||"production"===("undefined"!=typeof r&&null!==r&&null!=(u=r.env.NODE_ENV)?u.toLowerCase():void 0))return t;for(e=e.split(" "),a=o,s=0,i=e.length;i>s;s++)n=e[s],a=a[n];return a(t)},e.prototype.isPrintable=function(e){return this.level===s.UNMUTED?!0:this.level===s.MUTED?!1:this.types[e].level<=this.types[this.level].level},e.prototype._format=function(e){return i.apply(null,e)},e}()}).call(this,e("_process"))},{"./Default":2,_process:4,chalk:5,"format-util":13}],2:[function(e,t,r){"use strict";var n,s,o=[].slice;s=e("pretty-ms"),n={MIN_DIFF_MS:1e4},t.exports={PRINT:function(){var e,t,r;t=[];for(r in this.types)t.push(function(){var t,n,s,o;for(s=this.messages[r],o=[],t=0,n=s.length;n>t;t++)e=s[t],o.push(this.transport(this.generateMessage(r,e)));return o}.call(this));return t},OUTPUT_MESSAGE:function(e){return e},OUTPUT_TYPE:function(e,t){return null==t&&(t=""),this.align&&!this.timestamp?""+e+t+" ":""+e+t+" "},TRANSPORT:console.log,GENERATE_MESSAGE:function(e,t){var r,o,i;if(this.isPrintable(e))return r=this.types[e].color,t=this.outputMessage(t),t=this.colorize(this.types.line.color,t),this.timestamp?this.timestamp[e]?(o=new Date-this.timestamp[e],o=o>n.MIN_DIFF_MS?s(o):o+"ms",this.timestamp[e]=new Date,i=this.outputType(this.keyword||e," +"+o)):(this.timestamp[e]=new Date,i=this.outputType(this.keyword||e)):i=this.outputType(this.keyword||e),i=this.colorize(r,i),i+t},GENERATE_TYPE_MESSAGE:function(e){return function(t){return function(){var r;return r=1<=arguments.length?o.call(arguments,0):[],r=t._format(r),t.transport(t.generateMessage(e,r)),t}}(this)},DIFF:!1,ALIGN:!0,COLOR:!0,UNMUTED:"all",MUTED:"silent",TYPES:{line:{color:"gray"},error:{level:0,color:"red"},warn:{level:1,color:"yellow"},success:{level:2,color:"green"},info:{level:3,color:"white"},verbose:{level:4,color:"cyan"},debug:{level:5,color:"blue"},silly:{level:6,color:"magenta"}}}},{"pretty-ms":14}],3:[function(e,t,r){},{}],4:[function(e,t,r){function n(){c=!1,u.length?l=u.concat(l):f=-1,l.length&&s()}function s(){if(!c){var e=setTimeout(n);c=!0;for(var t=l.length;t;){for(u=l,l=[];++f<t;)u[f].run();f=-1,t=l.length}u=null,c=!1,clearTimeout(e)}}function o(e,t){this.fun=e,this.array=t}function i(){}var u,a=t.exports={},l=[],c=!1,f=-1;a.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new o(e,t)),1!==l.length||c||setTimeout(s,0)},o.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=i,a.addListener=i,a.once=i,a.off=i,a.removeListener=i,a.removeAllListeners=i,a.emit=i,a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},{}],5:[function(e,t,r){(function(r){"use strict";function n(e){this.enabled=e&&void 0!==e.enabled?e.enabled:f}function s(e){var t=function r(){return o.apply(r,arguments)};return t._styles=e,t.enabled=this.enabled,t.__proto__=g,t}function o(){var e=arguments,t=e.length,r=0!==t&&String(arguments[0]);if(t>1)for(var n=1;t>n;n++)r+=" "+e[n];if(!this.enabled||!r)return r;for(var s=this._styles,o=s.length;o--;){var i=a[s[o]];r=i.open+r.replace(i.closeRe,i.open)+i.close}return r}function i(){var e={};return Object.keys(h).forEach(function(t){e[t]={get:function(){return s.call(this,[t])}}}),e}var u=e("escape-string-regexp"),a=e("ansi-styles"),l=e("strip-ansi"),c=e("has-ansi"),f=e("supports-color"),p=Object.defineProperties;"win32"===r.platform&&(a.blue.open="");var h=function(){var e={};return Object.keys(a).forEach(function(t){a[t].closeRe=new RegExp(u(a[t].close),"g"),e[t]={get:function(){return s.call(this,this._styles.concat(t))}}}),e}(),g=p(function(){},h);p(n.prototype,i()),t.exports=new n,t.exports.styles=a,t.exports.hasColor=c,t.exports.stripColor=l,t.exports.supportsColor=f}).call(this,e("_process"))},{_process:4,"ansi-styles":6,"escape-string-regexp":7,"has-ansi":8,"strip-ansi":10,"supports-color":12}],6:[function(e,t,r){"use strict";var n=t.exports={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]}};n.colors.grey=n.colors.gray,Object.keys(n).forEach(function(e){var t=n[e];Object.keys(t).forEach(function(e){var r=t[e];n[e]=t[e]={open:"["+r[0]+"m",close:"["+r[1]+"m"}}),Object.defineProperty(n,e,{value:t,enumerable:!1})})},{}],7:[function(e,t,r){"use strict";var n=/[|\\{}()[\]^$+*?.]/g;t.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(n,"\\$&")}},{}],8:[function(e,t,r){"use strict";var n=e("ansi-regex"),s=new RegExp(n().source);t.exports=s.test.bind(s)},{"ansi-regex":9}],9:[function(e,t,r){"use strict";t.exports=function(){return/(?:(?:\u001b\[)|\u009b)(?:(?:[0-9]{1,3})?(?:(?:;[0-9]{0,3})*)?[A-M|f-m])|\u001b[A-M]/g}},{}],10:[function(e,t,r){"use strict";var n=e("ansi-regex")();t.exports=function(e){return"string"==typeof e?e.replace(n,""):e}},{"ansi-regex":11}],11:[function(e,t,r){arguments[4][9][0].apply(r,arguments)},{dup:9}],12:[function(e,t,r){(function(e){"use strict";var r=e.argv;t.exports=function(){return"FORCE_COLOR"in e.env?!0:-1!==r.indexOf("--no-color")||-1!==r.indexOf("--no-colors")||-1!==r.indexOf("--color=false")?!1:-1!==r.indexOf("--color")||-1!==r.indexOf("--colors")||-1!==r.indexOf("--color=true")||-1!==r.indexOf("--color=always")?!0:e.stdout&&!e.stdout.isTTY?!1:"win32"===e.platform?!0:"COLORTERM"in e.env?!0:"dumb"===e.env.TERM?!1:/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(e.env.TERM)?!0:!1}()}).call(this,e("_process"))},{_process:4}],13:[function(e,t,r){function n(e){var t=/(%?)(%([jds]))/g,r=Array.prototype.slice.call(arguments,1);return r.length&&(e=e.replace(t,function(e,t,n,s,o,i){var u=r.shift();switch(s){case"s":u=""+u;break;case"d":u=Number(u);break;case"j":u=JSON.stringify(u)}return t?(r.unshift(u),e):u})),r.length&&(e+=" "+r.join(" ")),e=e.replace(/%{2,2}/g,"%"),""+e}t.exports=n},{}],14:[function(e,t,r){"use strict";var n=e("parse-ms"),s=e("plur"),o=e("is-finite");t.exports=function(e,t){if(!o(e))throw new TypeError("Expected a finite number");if(t=t||{},1e3>e)return Math.ceil(e)+(t.verbose?" "+s("millisecond",Math.ceil(e)):"ms");var r=[],i=function(e,n,o,i){if(0!==e){var u=t.verbose?" "+s(n,e):o;r.push((i||e)+u)}},u=n(e);if(i(u.days,"day","d"),i(u.hours,"hour","h"),i(u.minutes,"minute","m"),t.compact)return i(u.seconds,"second","s"),"~"+r[0];var a=e/1e3%60,l="number"==typeof t.secDecimalDigits?t.secDecimalDigits:1,c=a.toFixed(l).replace(/\.0$/,"");return i(a,"second","s",c),r.join(" ")}},{"is-finite":15,"parse-ms":17,plur:18}],15:[function(e,t,r){"use strict";var n=e("number-is-nan");t.exports=Number.isFinite||function(e){return!("number"!=typeof e||n(e)||e===1/0||e===-(1/0))}},{"number-is-nan":16}],16:[function(e,t,r){"use strict";t.exports=Number.isNaN||function(e){return e!==e}},{}],17:[function(e,t,r){"use strict";t.exports=function(e){if("number"!=typeof e)throw new TypeError("Expected a number");return{days:Math.floor(e/864e5),hours:Math.floor(e/36e5%24),minutes:Math.floor(e/6e4%60),seconds:Math.floor(e/1e3%60),milliseconds:Math.floor(e%1e3)}}},{}],18:[function(e,t,r){"use strict";t.exports=function(e,t,r){return"number"==typeof t&&(r=t,t=e+"s"),1===r?e:t}},{}],Acho:[function(e,t,r){"use strict";e("coffee-script/register"),t.exports=e("./lib/Acho")},{"./lib/Acho":1,"coffee-script/register":3}]},{},[])("Acho")});

@@ -0,14 +1,88 @@

'use strict';
require('date-utils');
var Acho = require('./index.js');
var setDateout = require('set-dateout');
var acho = new Acho({
level: 'silly',
color: true
var base = new Acho({
align: true
});
acho.error('error message');
acho.warning('warning message');
acho.success('success message');
acho.info('info message');
acho.verbose('verbose message');
acho.debug('debug message');
acho.silly('silly message');
var diff = new Acho({
diff: true
});
var label = new Acho({
align: false,
keyword: 'worker#1'
});
var colors = new Acho({
color: false
});
var visit = new Acho({
keyword: 'visit'
});
var getStep = (function() {
var start = 0;
return function(value) {
if (value) start += value;
else ++start;
return start;
};
})();
var messageTimeout = (function() {
return function(level, message, logger, time) {
setDateout(function() {
logger[level](message);
}, new Date().add({seconds: getStep(0.8)}));
};
})();
var lineBreakTimeout = (function() {
return function(time) {
setDateout(function() {
console.log();
}, new Date().add({seconds: getStep(time || 0.2)}));
};
})();
messageTimeout('info', 'Simple', base);
messageTimeout('success', 'Tiny', base);
messageTimeout('verbose', 'Customizable', base);
messageTimeout('silly', 'Logger for NodeJS and Browser', base);
messageTimeout('warn', 'in less than...', base);
messageTimeout('error', '10KB!.', base);
lineBreakTimeout(1);
messageTimeout('info', 'Do you wanna to know more?', base);
lineBreakTimeout();
messageTimeout('success', 'support diff', diff);
messageTimeout('success', 'between messages', diff);
lineBreakTimeout();
messageTimeout('warn', 'adapt the logger label', label);
messageTimeout('warn', 'easily', label);
lineBreakTimeout();
messageTimeout('error', 'automatically color disabled', colors);
messageTimeout('error', 'under production', colors);
lineBreakTimeout();
messageTimeout('silly', 'and more more more...', base);
messageTimeout('debug', 'string interpolation', base);
messageTimeout('verbose', 'logs align', base);
messageTimeout('info', 'custom levels and transports', base);
lineBreakTimeout();
messageTimeout('success', 'https://github.com/Kikobeats/acho', visit);

@@ -5,3 +5,3 @@ {

"homepage": "https://github.com/Kikobeats/acho",
"version": "2.3.0",
"version": "2.4.0",
"main": "./index.js",

@@ -25,2 +25,3 @@ "author": {

"coffee-script": "*",
"format-util": "*",
"pretty-ms": "*"

@@ -31,2 +32,3 @@ },

"coffeeify": "*",
"date-utils": "*",
"gulp": "*",

@@ -37,2 +39,3 @@ "gulp-header": "*",

"mocha": "*",
"set-dateout": "*",
"should": "*",

@@ -39,0 +42,0 @@ "titleize": "*",

# acho
<h1 align="center">
<img src="http://i.imgur.com/XtTjX8G.png" alt="acho">
<img src="https://i.imgur.com/HPlBRLS.gif" alt="acho">
</h1>

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

You can provide the types and priorities.
#### print **{Function}**

@@ -204,0 +204,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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