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

babel-plugin-annotate-console-log

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-annotate-console-log

Annotates console.log call expression with information about the invocation context.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

babel-plugin-annotate-console-log

Travis build status NPM version Canonical Code Style Twitter Follow

Annotates console.log call expression with information about the invocation context.

Works with console.error, console.info, console.log and console.warn.

Example transpilation

Input:

function foo () {
  function bar () {
    console.log('apple');
  }
}

class Foo {
  bar () {
    console.log('banana');
  }
}

Output:

function foo () {
  function bar () {
    console.log('foo() bar()', 'apple');
  }
}

class Foo {
  bar () {
    console.log('Foo->bar()', 'banana');
  }
}

Motivation

I often get lost between many console.log messages. The Chrome DevTools allow you to filter the console output. However, you need to manually annotate each console.log statement with useful information for filtering.

This plugin enriches every console.log statement with information useful for filtering the messages.

Keywords

FAQs

Package last updated on 28 Nov 2016

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

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