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

bare-console

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bare-console - npm Package Compare versions

Comparing version 5.0.0 to 5.1.0

33

index.js

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

const inspect = require('bare-inspect')
const { formatWithOptions } = require('bare-format')
const hrtime = require('bare-hrtime')

@@ -14,2 +14,3 @@

this.log = this.log.bind(this)
this.warn = this.warn.bind(this)
this.error = this.error.bind(this)

@@ -23,7 +24,11 @@ this.time = this.time.bind(this)

log (...args) {
this._stdout.write(formatArgs(args, { colors: this._colors }) + '\n')
this._stdout.write(formatWithOptions({ colors: this._colors }, ...args) + '\n')
}
warn (...args) {
this._stderr.write(formatWithOptions({ colors: this._colors }, ...args) + '\n')
}
error (...args) {
this._stderr.write(formatArgs(args, { colors: this._colors }) + '\n')
this._stderr.write(formatWithOptions({ colors: this._colors }, ...args) + '\n')
}

@@ -57,4 +62,8 @@

trace (...args) {
const err = { name: 'Trace', message: formatArgs(args, { colors: this._colors }) }
Error.captureStackTrace(err, this.trace)
const err = { name: 'Trace', message: formatWithOptions({ colors: this._colors }, ...args) }
if (Error.captureStackTrace) {
Error.captureStackTrace(err, this.trace)
}
this.error(err.stack)

@@ -67,15 +76,1 @@ }

}
function formatArgs (args, opts) {
let out = ''
let first = true
for (const arg of args) {
if (first) first = false
else out += ' '
out += typeof arg === 'string' ? arg : inspect(arg, opts)
}
return out
}
{
"name": "bare-console",
"version": "5.0.0",
"version": "5.1.0",
"description": "Simple debugging console for JavaScript",

@@ -24,4 +24,4 @@ "main": "index.js",

"bare-events": "^2.2.0",
"bare-hrtime": "^2.0.0",
"bare-inspect": "^3.0.0"
"bare-format": "^1.0.0",
"bare-hrtime": "^2.0.0"
},

@@ -28,0 +28,0 @@ "devDependencies": {

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