babel-plugin-transform-implicit-return
v0.0.2
Published
Functions that returns implicitly, like Ruby methods:
Downloads
4
Readme
babel-plugin-transform-implicit-return
Functions that returns implicitly, like Ruby methods:
function someFunction() {
'implicitReturn';
123;
}
...is transformed to:
function someFunction() {
return 123;
}
Arrow functions with a {}
block are transfored too.
Functions without the implicitReturn
directive are not transformed.
Why?
It’s useful to create powerful REPLs.