New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

woodchopper

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

woodchopper

Selective logging based on command line arguments.

latest
npmnpm
Version
0.1.0
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

WoodChopper

Selective logging based on command line arguments and keys.

Written in CoffeeScript, usable in JavaScript.

Usable with all the console methods, as seen in this list from Mozilla.

Installation

$ npm install woodchopper

Use

Run your node program in the command line with the --print or -p flag and the keys you want to print:

$ node program.js --print important secure

Then in your code give your print statements their keys:

var chop = require('woodchopper');

chop.log(['important', 'superfluous'], 'This is the first print message');
chop.log(['superfluous', 'detail'], 'This is the second print message');
chop.log(['detail', 'secure'], 'This is the third print message');

This would result in the following messages being printed:

'This is the first print message'
'This is the third print message'

Running the program like this:

$ node program.js --print detail

Will result in:

'This is the second print message'
'This is the third print message'

If you give a print statement only one key you do not need to put it in an array:

    chop.log('superfluous', 'This is the fourth print message');

Keywords

log

FAQs

Package last updated on 14 Aug 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts