Socket
Socket
Sign inDemoInstall

dbug

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dbug - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

4

lib/dbug.js

@@ -76,7 +76,7 @@ /* This Source Code Form is subject to the terms of the Mozilla Public

+ text;
} : function plain(text) {
} : function plain(level, text) {
text = coerce(text);
return new Date().toUTCString()
+ ' ' + name + ' ' + text;
+ ' ' + name + '.' + level + ' ' + text;
};

@@ -83,0 +83,0 @@

{
"name": "dbug",
"version": "0.1.1",
"version": "0.1.2",
"description": "debug improvements",

@@ -10,3 +10,4 @@ "main": "./lib/dbug.js",

"devDependencies": {
"mocha": "1.x"
"mocha": "1.x",
"utcstring": "0.1.x"
},

@@ -13,0 +14,0 @@ "readmeFilename": "README.md",

@@ -9,2 +9,4 @@ /* This Source Code Form is subject to the terms of the Mozilla Public

const utc = require('utcstring');
const foo = require('../')('foo');

@@ -40,2 +42,6 @@ const bar = require('../')('bar');

function contains(haystack, needle) {
return haystack.indexOf(needle) !== -1;
}
module.exports = {

@@ -83,6 +89,2 @@ 'dbug': {

function contains(haystack, needle) {
return haystack.indexOf(needle) !== -1;
}
foo('z');

@@ -140,2 +142,18 @@ assert(contains(stdout.lastWrite, 'z'));

assert(require('../')('foo').plain);
},
'should format with utc': function() {
process.env.DEBUG_COLOR = false;
var plain = require('../')('foo');
process.stdout.write = testOut;
plain('bar baz quux');
assert(utc.has(stdout.lastWrite));
assert(contains(stdout.lastWrite, 'bar baz quux'));
plain('fuji', 'barbie');
assert(contains(stdout.lastWrite, 'fuji barbie'));
process.stdout.write = out;
}

@@ -142,0 +160,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