babel-plugin-transform-console-log-self

0.1.1 • Public • Published

babel-plugin-transform-console-log-self

Makes console.log calls print their arguments in textual form.

Example

const a = 11, b = 22, c = 33, d = 44
console.log(a, b, c + d)

prints 11 22 77. The plugin replaces the console.log above with

console.log("a", a, "b", b, "c + d", c + d)

which prints the much more informative a 11 b 22 c + d 77

Installation

npm install babel-plugin-transform-console-log-self

Usage

Via .babelrc (Recommended)

{
  "plugins": ["transform-console-log-self"]
}

Via CLI

babel --plugins transform-console-log-self script.js

Via Node API

require('babel').transform('code', {
	plugins: ['transform-console-log-self']
})

Package Sidebar

Install

npm i babel-plugin-transform-console-log-self

Weekly Downloads

2

Version

0.1.1

License

MIT

Last publish

Collaborators

  • adrianton3