New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

g-log-http-info

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

g-log-http-info - npm Package Compare versions

Comparing version 0.3.7 to 0.3.9

8

lib/index.js

@@ -9,3 +9,3 @@ 'use strict';

// [INFO] params = parsedUrl, reqMethod, reqDate, reqStartTime, resStatus
// [INFO] params = reqUri, reqMethod, reqDate, reqStartTime, resStatus

@@ -21,8 +21,8 @@ function logToConsole(info) {

var iDivider = '-'.repeat(columns);
console.log(color, iDivider);
console.log(color, '\u001b[1m' + iDivider + '\u001b[0m');
for (var i = 0, j = messages.length; i < j; i++) {
console.log(color, ' '.repeat(columns / 2 - 1 - messages[i].length / 2) + ' ' + messages[i]);
console.log(color, ' '.repeat(columns / 2 - 1 - messages[i].length / 2) + ' \u001b[1m' + messages[i] + '\u001b[0m');
}
console.log(color, iDivider);
console.log(color, '\u001b[1m' + iDivider + '\u001b[0m\n');
}
module.exports = exports['default'];
{
"name": "g-log-http-info",
"version": "0.3.7",
"version": "0.3.9",
"description": "Log HTTP requests and response to console or to log file depending on mode",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -5,3 +5,3 @@ 'use strict';

// [INFO] params = parsedUrl, reqMethod, reqDate, reqStartTime, resStatus
// [INFO] params = reqUri, reqMethod, reqDate, reqStartTime, resStatus

@@ -22,10 +22,10 @@ export default function logToConsole(info) {

const iDivider = '-'.repeat(columns);
console.log(color, iDivider);
console.log(color, `\x1b[1m${iDivider}\x1b[0m`);
for (let i = 0, j = messages.length; i < j; i++) {
console.log(
color,
`${' '.repeat((columns / 2 - 1) - messages[i].length / 2)} ${messages[i]}`
`${' '.repeat((columns / 2 - 1) - messages[i].length / 2)} \x1b[1m${messages[i]}\x1b[0m`
);
}
console.log(color, iDivider);
console.log(color, `\x1b[1m${iDivider}\x1b[0m\n`);
}

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