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

extra-log

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

extra-log - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

17

package.json
{
"name": "extra-log",
"version": "1.0.0",
"version": "1.0.1",
"description": "Simple log wrapper for console which uses chalk for colors and cowsay for better loggin",
"main": "src/log.js",
"scripts": {
"lint": "eslint src",
"prepublishOnly": "npm test",
"test": "jest",
"test-coverage": "jest && codecov"
"test-coverage": "jest --coverage",
"test-coverage-report": "codecov"
},

@@ -30,3 +33,11 @@ "keywords": [

"coverageDirectory": "./coverage/",
"collectCoverage": true
"collectCoverage": true,
"coverageThreshold": {
"global": {
"branches": 100,
"functions": 100,
"lines": 100,
"statements": 100
}
}
},

@@ -33,0 +44,0 @@ "repository": {

@@ -5,2 +5,3 @@ # extra-log

[![codecov](https://codecov.io/gh/rumax/extra-log/branch/master/graph/badge.svg)](https://codecov.io/gh/rumax/extra-log)
[![npm version](https://badge.fury.io/js/extra-log.svg)](https://badge.fury.io/js/extra-log)

@@ -7,0 +8,0 @@ Simple wrapper for [console](https://developer.mozilla.org/en-US/docs/Web/API/Console) using

12

src/log.js

@@ -8,2 +8,8 @@ const chalk = require('chalk');

log(chalk[color](cowsay.say({ text: msg })));
const colorArgs = (color, params) => params.map((param) => {
if ('object' === typeof param) {
return param;
}
return chalk[color](param);
});

@@ -28,3 +34,3 @@ const maxLevel = 3;

activeLavel = maxLevel;
} if (activeLavel < 0) {
} if (0 > activeLavel) {
activeLavel = 0;

@@ -42,3 +48,3 @@ }

if (levels.info <= activeLavel) {
log(chalk.grey(...args));
log(...colorArgs('grey', args));
}

@@ -50,3 +56,3 @@ },

if (levels.msg <= activeLavel) {
log(chalk.green(...args));
log(...colorArgs('green', args));
}

@@ -53,0 +59,0 @@ },

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