$ npm install babel-helper-wrap-function
This helper wraps a function within a call expression. It works with any function: statements, expressions and methods; both named and anonymous.
In
(function () {
}());
Out
_wrapper(function () {
})();
import wrapFunction from "babel-helper-wrap-function";
wrapFunction(nodePathOfTheFunction, nodeWhichReferencesToTheWrapper);
© 2010 - cnpmjs.org x YWFE | Home | YWFE