npm.io
1.6.26 • Published 3 years ago

vscode-wrap-console-log-simple

Licence
MIT
Version
1.6.26
Deps
4
Size
3.3 MB
Vulns
23
Weekly
0
Stars
13
Install scriptsThis package runs scripts during installation (preinstall/install/postinstall)

Demo

demo.gif

source code

https://github.com/WooodHead/vscode-wrap-console-log-simple

original project

https://github.com/midnightsyntax/vscode-wrap-console-log

Features

This extension read the word under your cursor and insert a statement with the word:

alt + E: console.log('variable');

cmd + E: console.log('variable', variable);

alt + A: new line;

alt + W: // comment line

cmd + J: console.log('variable', JSON.stringify(variable, null, 2));

alt + F: expect(variable).toBeDefined();

In settings, replace console.log with your own function name, example:

Wrap-console-log-simple: Function Name

debug

will output

debug('variable');
debug('variable', variable);

Search in 180M open source javascript projects.

https://codexp.link

image

Keywords