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

fancy-log

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fancy-log - npm Package Compare versions

Comparing version 1.3.1 to 1.3.2

23

index.js

@@ -7,5 +7,26 @@ 'use strict';

var timestamp = require('time-stamp');
var supportsColor = require('color-support');
function hasFlag(flag) {
return (process.argv.indexOf('--' + flag) !== -1);
}
function addColor(str) {
if (hasFlag('no-color')) {
return str;
}
if (hasFlag('color')) {
return gray(str);
}
if (supportsColor()) {
return gray(str);
}
return str;
}
function getTimestamp(){
return '['+gray(timestamp('HH:mm:ss'))+']';
return '['+addColor(timestamp('HH:mm:ss'))+']';
}

@@ -12,0 +33,0 @@

3

package.json
{
"name": "fancy-log",
"version": "1.3.1",
"version": "1.3.2",
"description": "Log things, prefixed with a timestamp",

@@ -24,2 +24,3 @@ "author": "Blaine Bublitz <blaine.bublitz@gmail.com>",

"ansi-gray": "^0.1.1",
"color-support": "^1.1.3",
"time-stamp": "^1.0.0"

@@ -26,0 +27,0 @@ },

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