Why leave your editor just to log a couple lines? Add a trailing // =>
comment to any line you want to peak at, then run poofjs
and see the results inline.
5 * 7; // =>
Code in => POOF 💥 => Code + results out.
5 * 7; // => 35
Designed for TL;DR: a JavaScript screencast series for working web developers.
Inspired by xmpfilter
and RubyTapas.
let res = 20 + 4; // => 24
let doThing = (val) => {
return val * 4; // => 8
};
doThing(2);
// => 8
[1,2,3]; // => [ 1, 2, 3 ]
poofjs
takes your code as stdin and spits out the code with results as stdout.
$ echo "5 * 4; // =>" | poofjs
In vim, use the cmd
command to feed it the current buffer:
:%! poofjs
xmpfilter
for Rubyarrow-logger
for JavaScriptpipe2eval
for anything