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 1.0.6 to 1.0.7

.bumpedrc

4

bower.json
{
"name": "acho",
"description": "An extremely simple (but powerful) logging system for NodeJS and browser.",
"version": "1.0.6",
"version": "1.0.7",
"authors": [
"Kiko Beats josefrancisco.verdu@gmail.com"
"Kiko Beats josefrancisco.verdu@gmail.com"
],

@@ -8,0 +8,0 @@ "ignore": [

# Change Log
## [1.0.6](https://github.com/Kikobeats/acho/tree/1.0.6) (2015-05-10)
[Full Changelog](https://github.com/Kikobeats/acho/compare/1.0.5...1.0.6)
## [1.0.5](https://github.com/Kikobeats/acho/tree/1.0.5) (2015-05-09)

@@ -4,0 +8,0 @@

/**
* acho - An extremely simple (but powerful) logging system for NodeJS and browser.
* @version v1.0.6
* @version v1.0.7
* @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(s,u){if(!r[s]){if(!t[s]){var c="function"==typeof require&&require;if(!u&&c)return c(s,!0);if(i)return i(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var f=r[s]={exports:{}};t[s][0].call(f.exports,function(e){var r=t[s][1][e];return o(r?r:e)},f,f.exports,e,t,r,n)}return r[s].exports}for(var i="function"==typeof require&&require,s=0;s<n.length;s++)o(n[s]);return o}({1:[function(e,t){"use strict";var r,n,o;o=e("chalk"),n=e("./Default"),t.exports=r=function(){function e(e){null==e&&(e={}),this.color=e.color||n.COLOR,this.level=e.level||n.LEVEL,this.types=e.types||n.TYPES,this.print=e.print||n.PRINT,this.muted=e.muted||n.MUTED,this.messages=function(e){return function(){var t,r;t={};for(r in e.types)t[r]=[];return t}}(this)(),this.outputType=e.outputType||n.OUTPUT_TYPE,this.outputMessage=e.outputMessage||n.OUTPUT_MESSAGE}return e.DEFAULT=n,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.error=function(e){return this.printLine("error",e),this},e.prototype.warn=function(e){return this.printLine("warn",e),this},e.prototype.success=function(e){return this.printLine("success",e),this},e.prototype.info=function(e){return this.printLine("info",e),this},e.prototype.verbose=function(e){return this.printLine("verbose",e),this},e.prototype.debug=function(e){return this.printLine("debug",e),this},e.prototype.silly=function(e){return this.printLine("silly",e),this},e.prototype.isPrintable=function(e){return this.level===this.muted?!1:this.types[e].level<=this.types[this.level].level},e.prototype.colorize=function(e,t){var r,n,i,s;if(!this.color)return t;for(e=e.split(" "),s=o,n=0,i=e.length;i>n;n++)r=e[n],s=s[r];return s(t)},e.prototype.printLine=function(e,t){var r,n;if(this.isPrintable(e))return r=this.types[e].color,n=this.outputType(e),n=this.colorize(r,n),t=this.outputMessage(t),t=this.colorize(this.types.line.color,t),console.log(n+t)},e}()},{"./Default":2,chalk:5}],2:[function(e,t){"use strict";t.exports={OUTPUT_TYPE:function(e){return e+" : "},OUTPUT_MESSAGE:function(e){return e},PRINT:function(){var e,t,r;t=[];for(r in this.types)t.push(function(){var t,n,o,i;for(o=this.messages[r],i=[],t=0,n=o.length;n>t;t++)e=o[t],i.push(this.printLine(r,e));return i}.call(this));return t},LEVEL:"info",COLOR:!1,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"}}}},{}],3:[function(){},{}],4:[function(e,t){function r(){if(!s){s=!0;for(var e,t=i.length;t;){e=i,i=[];for(var r=-1;++r<t;)e[r]();t=i.length}s=!1}}function n(){}var o=t.exports={},i=[],s=!1;o.nextTick=function(e){i.push(e),s||setTimeout(r,0)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=n,o.addListener=n,o.once=n,o.off=n,o.removeListener=n,o.removeAllListeners=n,o.emit=n,o.binding=function(){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],5:[function(e,t){(function(r){"use strict";function n(e){this.enabled=e&&void 0!==e.enabled?e.enabled:p}function o(e){var t=function r(){return i.apply(r,arguments)};return t._styles=e,t.enabled=this.enabled,t.__proto__=g,t}function i(){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,i=o.length;i--;){var s=c[o[i]];r=s.open+r.replace(s.closeRe,s.open)+s.close}return r}function s(){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"),f=e("has-ansi"),p=e("supports-color"),a=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=a(function(){},h);a(n.prototype,s()),t.exports=new n,t.exports.styles=c,t.exports.hasColor=f,t.exports.stripColor=l,t.exports.supportsColor=p}).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){"use strict";var r=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]}};r.colors.grey=r.colors.gray,Object.keys(r).forEach(function(e){var t=r[e];Object.keys(t).forEach(function(e){var n=t[e];r[e]=t[e]={open:"["+n[0]+"m",close:"["+n[1]+"m"}}),Object.defineProperty(r,e,{value:t,enumerable:!1})})},{}],7:[function(e,t){"use strict";var r=/[|\\{}()[\]^$+*?.]/g;t.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(r,"\\$&")}},{}],8:[function(e,t){"use strict";var r=e("ansi-regex"),n=new RegExp(r().source);t.exports=n.test.bind(n)},{"ansi-regex":9}],9:[function(e,t){"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){"use strict";var r=e("ansi-regex")();t.exports=function(e){return"string"==typeof e?e.replace(r,""):e}},{"ansi-regex":11}],11:[function(e,t,r){arguments[4][9][0].apply(r,arguments)},{dup:9}],12:[function(e,t){(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:"UPSTART_JOB"in e.env?!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}],Acho:[function(e,t){"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 o(s,u){if(!r[s]){if(!t[s]){var c="function"==typeof require&&require;if(!u&&c)return c(s,!0);if(i)return i(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var f=r[s]={exports:{}};t[s][0].call(f.exports,function(e){var r=t[s][1][e];return o(r?r:e)},f,f.exports,e,t,r,n)}return r[s].exports}for(var i="function"==typeof require&&require,s=0;s<n.length;s++)o(n[s]);return o}({1:[function(e,t){"use strict";var r,n,o,i=function(e,t){return function(){return e.apply(t,arguments)}};o=e("chalk"),n=e("./Default"),t.exports=r=function(){function e(e){null==e&&(e={}),this._printLevelMessage=i(this._printLevelMessage,this),this.color=e.color||n.COLOR,this.level=e.level||n.UNMUTED,this.types=e.types||n.TYPES,this.print=e.print||n.PRINT,this.messages=function(e){return function(){var t,r;t={};for(r in e.types)t[r]=[],"line"!==r&&(e[r]=e._printLevelMessage(r));return t}}(this)(),this.outputType=e.outputType||n.OUTPUT_TYPE,this.outputMessage=e.outputMessage||n.OUTPUT_MESSAGE}return e.DEFAULT=n,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 r,n,i,s;if(!this.color)return t;for(e=e.split(" "),s=o,n=0,i=e.length;i>n;n++)r=e[n],s=s[r];return s(t)},e.prototype.isPrintable=function(e){return this.level===n.UNMUTED?!0:this.level===n.MUTED?!1:this.types[e].level<=this.types[this.level].level},e.prototype.printLine=function(e,t){var r,n;if(this.isPrintable(e))return r=this.types[e].color,n=this.outputType(e),n=this.colorize(r,n),t=this.outputMessage(t),t=this.colorize(this.types.line.color,t),console.log(n+t)},e.prototype._printLevelMessage=function(e){return function(t){return function(r){return t.printLine(e,r),t}}(this)},e}()},{"./Default":2,chalk:5}],2:[function(e,t){"use strict";t.exports={OUTPUT_TYPE:function(e){return e+" : "},OUTPUT_MESSAGE:function(e){return e},PRINT:function(){var e,t,r;t=[];for(r in this.types)t.push(function(){var t,n,o,i;for(o=this.messages[r],i=[],t=0,n=o.length;n>t;t++)e=o[t],i.push(this.printLine(r,e));return i}.call(this));return t},COLOR:!1,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"}}}},{}],3:[function(){},{}],4:[function(e,t){function r(){if(!s){s=!0;for(var e,t=i.length;t;){e=i,i=[];for(var r=-1;++r<t;)e[r]();t=i.length}s=!1}}function n(){}var o=t.exports={},i=[],s=!1;o.nextTick=function(e){i.push(e),s||setTimeout(r,0)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=n,o.addListener=n,o.once=n,o.off=n,o.removeListener=n,o.removeAllListeners=n,o.emit=n,o.binding=function(){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],5:[function(e,t){(function(r){"use strict";function n(e){this.enabled=e&&void 0!==e.enabled?e.enabled:a}function o(e){var t=function r(){return i.apply(r,arguments)};return t._styles=e,t.enabled=this.enabled,t.__proto__=g,t}function i(){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,i=o.length;i--;){var s=c[o[i]];r=s.open+r.replace(s.closeRe,s.open)+s.close}return r}function s(){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"),f=e("has-ansi"),a=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,s()),t.exports=new n,t.exports.styles=c,t.exports.hasColor=f,t.exports.stripColor=l,t.exports.supportsColor=a}).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){"use strict";var r=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]}};r.colors.grey=r.colors.gray,Object.keys(r).forEach(function(e){var t=r[e];Object.keys(t).forEach(function(e){var n=t[e];r[e]=t[e]={open:"["+n[0]+"m",close:"["+n[1]+"m"}}),Object.defineProperty(r,e,{value:t,enumerable:!1})})},{}],7:[function(e,t){"use strict";var r=/[|\\{}()[\]^$+*?.]/g;t.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(r,"\\$&")}},{}],8:[function(e,t){"use strict";var r=e("ansi-regex"),n=new RegExp(r().source);t.exports=n.test.bind(n)},{"ansi-regex":9}],9:[function(e,t){"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){"use strict";var r=e("ansi-regex")();t.exports=function(e){return"string"==typeof e?e.replace(r,""):e}},{"ansi-regex":11}],11:[function(e,t,r){arguments[4][9][0].apply(r,arguments)},{dup:9}],12:[function(e,t){(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:"UPSTART_JOB"in e.env?!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}],Acho:[function(e,t){"use strict";e("coffee-script/register"),t.exports=e("./lib/Acho")},{"./lib/Acho":1,"coffee-script/register":3}]},{},[])("Acho")});
{
"name": "acho",
"version": "1.0.6",
"version": "1.0.7",
"description": "An extremely simple (but powerful) logging system for NodeJS and browser.",

@@ -5,0 +5,0 @@ "author": {

@@ -7,2 +7,3 @@ # acho

![Last version](https://img.shields.io/github/tag/Kikobeats/acho.svg?style=flat-square)
[![Build Status](http://img.shields.io/travis/Kikobeats/acho/master.svg?style=flat)](https://travis-ci.org/Kikobeats/acho)

@@ -129,3 +130,3 @@ [![Dependency status](http://img.shields.io/david/Kikobeats/acho.svg?style=flat)](https://david-dm.org/Kikobeats/acho)

Establishing the loglevel is a good way to filter out undesired information from output. The available levels are:
Establishing the loglevel is a good way to filter out undesired information from output. The available levels by default are:

@@ -139,5 +140,9 @@ - `error`: Display calls to `.error()` messages.

- `silly`: Display calls from `.error()`, `.warn()`, `success()`, `info()`, `verbose()`, `debug()`, `silly()` messages.
Additionally exists two special levels:
- `silent`: Avoid all output.
- `all`: Allow print all message types.
The default log level is `info`. You can define it in the the constructor:
The default log level is `all`. You can define it in the constructor:

@@ -185,3 +190,2 @@ ```js

## API

@@ -194,10 +198,8 @@

- color **{Boolean}**: Enable or disable colorized output. `false` by default.
- level **{String}**: Provides the logging level. `info` by default.
- level **{String}**: Provides the logging level. `all` by default.
- types **{Object}**: You can provide the types and priorities.
- print **{Function}**: Provides a function to print the messages.
- muted **{String}**: Determines the log level to avoid output messages. `silent` by default.
- outputType **{Function}**: Provides a function to customize the type in the output.
- outputMessage **{Function}**: Provides a function to customize the message in the output.
### .push({String} &lt;type&gt;, {String} &lt;message&gt;)

@@ -211,30 +213,8 @@

### .error({String} &lt;message&gt;)
For each level you have a function following the pattern:
Output a `error` message.
### .\[loglevel\]({String} &lt;message&gt;)
### .warn({String} &lt;message&gt;)
For each log level that you declared in the constructor (or the default log levels provides by the library if you don't declare nothing) will be created a function with the same name to output a message with these log level.
Output a `warn` message.
### .success({String} &lt;message&gt;)
Output a `success` message.
### .info({String} &lt;message&gt;)
Output a `info` message.
### .verbose({String} &lt;message&gt;)
Output a `verbose` message.
### .debug({String} &lt;message&gt;)
Output a `debug` message.
### .silly({String} &lt;message&gt;)
Output a `silly` message.
### .isPrintable({String} &lt;type&gt;)

@@ -241,0 +221,0 @@

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