Socket
Socket
Sign inDemoInstall

console-log-level

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

console-log-level - npm Package Compare versions

Comparing version 1.2.1 to 1.3.0

2

index.js

@@ -37,3 +37,3 @@ 'use strict'

console[normalizedLevel].apply(console, arguments)
console[normalizedLevel](util.format.apply(util, arguments))
}

@@ -40,0 +40,0 @@ })

{
"name": "console-log-level",
"version": "1.2.1",
"version": "1.3.0",
"description": "The most simple logger imaginable",

@@ -30,9 +30,9 @@ "main": "index.js",

"devDependencies": {
"standard": "^5.2.2",
"tape": "^3.0.3"
"standard": "^7.1.2",
"tape": "^4.5.1"
},
"coordinates": [
60.2016461,
24.9573858
55.68769709999999,
12.5956283
]
}

@@ -133,8 +133,7 @@ 'use strict'

var logger = Logger({ prefix: now })
var msg = 'bar'
var args = (function () { return arguments })(now + ' foo bar')
spyOn('info', function () {
spyOff('info')
t.equal(arguments[0], now + ' foo %s', 'first arg ok')
t.equal(arguments[1], msg, 'second arg ok')
t.deepEqual(arguments, args, 'arguments ok')
})

@@ -144,4 +143,3 @@

spyOff('warn')
t.equal(arguments[0], now + ' foo %s', 'first arg ok')
t.equal(arguments[1], msg, 'second arg ok')
t.deepEqual(arguments, args, 'arguments ok')
})

@@ -151,10 +149,9 @@

spyOff('error')
t.equal(arguments[0], now + ' foo %s', 'first arg ok')
t.equal(arguments[1], msg, 'second arg ok')
t.deepEqual(arguments, args, 'arguments ok')
t.end()
})
logger.info('foo %s', msg)
logger.warn('foo %s', msg)
logger.error('foo %s', msg)
logger.info('foo %s', 'bar')
logger.warn('foo %s', 'bar')
logger.error('foo %s', 'bar')
})

@@ -165,8 +162,7 @@

var logger = Logger({ prefix: function () { return now } })
var msg = 'bar'
var args = (function () { return arguments })(now + ' foo bar')
spyOn('info', function () {
spyOff('info')
t.equal(arguments[0], now + ' foo %s', 'first arg ok')
t.equal(arguments[1], msg, 'second arg ok')
t.deepEqual(arguments, args, 'arguments ok')
})

@@ -176,4 +172,3 @@

spyOff('warn')
t.equal(arguments[0], now + ' foo %s', 'first arg ok')
t.equal(arguments[1], msg, 'second arg ok')
t.deepEqual(arguments, args, 'arguments ok')
})

@@ -183,10 +178,9 @@

spyOff('error')
t.equal(arguments[0], now + ' foo %s', 'first arg ok')
t.equal(arguments[1], msg, 'second arg ok')
t.deepEqual(arguments, args, 'arguments ok')
t.end()
})
logger.info('foo %s', msg)
logger.warn('foo %s', msg)
logger.error('foo %s', msg)
logger.info('foo %s', 'bar')
logger.warn('foo %s', 'bar')
logger.error('foo %s', 'bar')
})

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