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

printit

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

printit - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

17

main.js

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.8.0
// Generated by CoffeeScript 1.9.0
var Logger, colors, dateFormat, levelColors;

@@ -27,4 +27,4 @@

Logger = (function() {
function Logger(options) {
this.options = options;
function Logger(_at_options) {
this.options = _at_options;
if (this.options == null) {

@@ -43,3 +43,3 @@ this.options = {};

Logger.prototype.format = function(level, text) {
var date, padding;
var date;
if (text instanceof Object) {

@@ -49,9 +49,4 @@ text = JSON.stringify(text);

if (this.options.prefix != null) {
text = "" + this.options.prefix + " | " + text;
text = this.options.prefix + " | " + text;
}
if (level === 'info' || level === 'warn') {
padding = ' ';
} else {
padding = '';
}
if (process.env.NODE_ENV !== 'production') {

@@ -61,3 +56,3 @@ level = this.colorify(level, levelColors[level]);

if (level) {
text = "" + level + padding + " - " + text;
text = level + " - " + text;
}

@@ -64,0 +59,0 @@ if (this.options.date) {

@@ -16,3 +16,3 @@ {

],
"version": "0.1.5",
"version": "0.1.6",
"homepage": "https://github.com/frankrousseau/printit/",

@@ -19,0 +19,0 @@ "bugs": {

@@ -10,2 +10,14 @@ ## It began with a console.log...

### Display rules
The way printit displays things is changed via environment variable:
* Debug messages are not displayed.
* When NODE_ENV is 'production', it doesn't display colors (it's better when you cat/tail a log file).
* When NODE_ENV is 'test', it doesn't display logs (logs make mocha output
looks less messy).
* When DEBUG is 'true', it displays the debug messages.
### Examples
```javascript

@@ -12,0 +24,0 @@ var printit = require('printit');

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