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

ee-log

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ee-log - npm Package Compare versions

Comparing version 0.1.7 to 0.1.8

.npmignore

65

index.js

@@ -1,40 +0,41 @@

"use strict";
var util = require( "util" );
( function(){
// colorful strings
var stylize = function ( str, style ) {
var styles = {
"bold": [ 1, 22 ]
, "italic": [ 3, 23 ]
, "underline": [ 4, 24 ]
, "inverse": [ 7, 27 ]
, "white": [ 37, 39 ]
, "grey": [ 90, 39 ]
, "black": [ 90, 39 ]
, "blue": [ 34, 39 ]
, "cyan": [ 36, 39 ]
, "green": [ 32, 39 ]
, "magenta": [ 35, 39 ]
, "red": [ 31, 39 ]
, "yellow": [ 33, 39 ]
};
return '\x1b[' + ( styles[ style ][ 0 ] ) + "m" + str + '\x1b[' + ( styles[ style ][ 1 ] ) + "m";
};
// colorful strings
var stylize = function ( str, style ) {
var styles = {
"bold": [ 1, 22 ]
, "italic": [ 3, 23 ]
, "underline": [ 4, 24 ]
, "inverse": [ 7, 27 ]
, "white": [ 37, 39 ]
, "grey": [ 90, 39 ]
, "black": [ 90, 39 ]
, "blue": [ 34, 39 ]
, "cyan": [ 36, 39 ]
, "green": [ 32, 39 ]
, "magenta": [ 35, 39 ]
, "red": [ 31, 39 ]
, "yellow": [ 33, 39 ]
};
return '\x1b[' + ( styles[ style ][ 0 ] ) + "m" + str + '\x1b[' + ( styles[ style ][ 1 ] ) + "m";
};
[ "bold", "underline", "italic", "inverse", "grey", "yellow", "red", "green", "blue", "white", "cyan", "magenta" ].forEach( function( style ) {
if ( !Object.prototype.hasOwnProperty.call( String.prototype, style ) ){
Object.defineProperty( String.prototype, style, {
get: function () {
return stylize(this, style);
}
} );
}
} );
} )();
[ "bold", "underline", "italic", "inverse", "grey", "yellow", "red", "green", "blue", "white", "cyan", "magenta" ].forEach( function( style ) {
if ( !String[ style ] ){
Object.defineProperty( String.prototype, style, {
get: function () {
return stylize(this, style);
}
} );
}
} );
var Class = require( "ee-class" )

@@ -41,0 +42,0 @@ , cluster = require( "cluster" )

{
"name": "ee-log"
, "description": "simple & colorful console log replacement"
, "version": "0.1.7"
, "version": "0.1.8"
, "homepage": "https://github.com/eventEmitter/ee-log"

@@ -6,0 +6,0 @@ , "author": "Michael van der Weg <michael@eventemitter.com> (http://eventemitter.com/)"

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