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

babel-plugin-captains-log

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-captains-log

Babel plugin that injects helpful details into console statements

  • 0.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
144
increased by4.35%
Maintainers
1
Weekly downloads
 
Created
Source

Captain's Log (☠️)

version downloads Travis Build Status codecov

MIT License Roadmap All Contributors semantic-release

Watch on GitHub Star on GitHub Tweet

Usage

babel-plugin-captains-log injects helpful details into console statements.

Current version only injects the console statments scope.

Transforms

function add(a, b) {
-  console.log(a, b);
+  console.log("add:", a, b);
  return a + b;
}

const subtract = (a, b) => {
-  console.log(a, b);
+  console.log("subtract:", a, b);
  return a - b;
};

See the Roadmap for a future features and oppurtunities to contribute.

Requirements

This is a Babel plugin so it requires Babel v6 to run.

Installation

This module is distributed using npm which comes bundled with node:

npm install --save-dev babel-plugin-captains-log

To include the plugin in your project, create or open your .babelrc file at the root of your project. Then, add namespaces to your plugin list:

{
  plugins: ["captains-log"]
}

Settings and options are below.

Roadmap

  • Handle alias for console/ desctructored methods
  • Arrow functions within classes (stage-2 integration)
  • Add config for methods
  • Add ability to label variables in console statments
  • Add ability to timestamp console statements
  • Add ability to auto add console statements to methods

License

MIT

Contributors

Thanks goes to these wonderful people (emoji key):


Kyle Welch

💻 📖 ⚠️

This project follows the all-contributors specification. Contributions of any kind welcome!

Keywords

FAQs

Package last updated on 24 Apr 2017

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