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

log-segment

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

log-segment - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

35

main.js

@@ -165,22 +165,21 @@ 'use strict'

}
let _args = Array.prototype.slice.call(arguments)
_args = _args.map((message) => {
// stringify an object
if (typeof message === 'object') {
message = JSON.stringify(message)
} else if (typeof message === 'function') {
message = message()
}
// add segment color
// paint the message
if (__segments[segment] &&
__segments[segment].color &&
chalk[__segments[segment].color]) {
return chalk[__segments[segment].color](message)
}
return message
})
// add segment color
if (__segments[segment] && __segments[segment].color) {
_args = _args.map((message) => {
// stringify an object
if (typeof message === 'object') {
message = JSON.stringify(message)
} else if (typeof message === 'function') {
message = message()
}
// paint the message
if (chalk[__segments[segment].color]) {
return chalk[__segments[segment].color](message)
} else {
return message
}
})
}
// add marker

@@ -187,0 +186,0 @@ if (__levels[level].marker) {

{
"name": "log-segment",
"version": "1.0.6",
"version": "1.0.7",
"description": "logger with partition",

@@ -5,0 +5,0 @@ "main": "main.js",

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