$ cnpm 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);
Copyright 2013 - present © cnpmjs.org