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

consoleify

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

consoleify

browserify transform to inject a custom console object that prefix the calls to it with the name of the module itself

latest
Source
npmnpm
Version
1.1.3
Version published
Maintainers
1
Created
Source

NPM Version Build Status

consoleify

browserify transform to inject a custom console object that prefix the calls to it with the name of the module itself

Overview

This transform will turn this:

//my-module.js
var someFunc = function () {
  console.log('hello');
};
module.exports = someFunc;

Into this:

/*wrapping console start!*/
var console = require('consoleify/console-wrapper').create("dummy2");
/*wrapping console end!*/

var someFunc = function () {
};
module.exports = someFunc;

So console methods calls are prefixed by the module where the call was done, for easy tracking/filtering of logs

the consoleify/console-wrapper module is also part of this module

Install

npm i --save-dev consoleify

Usage

var consoleify = require( 'consoleify' );

var b = browserify();
b.add('./my-module');
b.transform( consoleify );
b.bundle().pipe(process.stdout);

License

MIT

Changelog

Changelog

Keywords

console

FAQs

Package last updated on 24 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