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

consolev

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

consolev - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

37

consolev.js

@@ -1,15 +0,26 @@

/**
* Created by Vincent on 2017/10/23.
*/
module.exports = function(v) {
/* eslint-disable */
const version = process.env.VERSION || process.env.REACT_APP_VERSION;
module.exports = function() {
const args = Array.prototype.slice
.call(arguments)
.map(val => {
if (val === undefined) {
return 'undefined';
} else if (typeof val === 'string') {
return val;
}
try {
return JSON.stringify(val);
} catch (error) {
return '[TypeError]';
}
})
.join(' ');
console.log(
'%c [%s] %s ',
'background: ' +
(process.env.NODE_ENV === 'production' ? '#000' : '#f00') +
'; color: #fff;',
process.env.NODE_ENV,
v
? Array.prototype.slice.call(arguments).toString()
: process.env.VERSION || process.env.REACT_APP_VERSION
); // eslint-disable-line
`%c [${process.env.NODE_ENV}] ${version} %c ${args}`,
`background: ${
process.env.NODE_ENV === 'production' ? '#000' : '#f00'
}; color: #fff;`,
``
);
};
{
"name": "consolev",
"version": "1.0.4",
"version": "1.0.5",
"description": "",

@@ -5,0 +5,0 @@ "main": "consolev.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