babel/packages/babel-helper-wrap-function
2017-09-11 23:01:41 -04:00
..
2017-08-05 14:48:15 -04:00
2017-07-25 11:07:01 -04:00
2017-09-11 23:01:41 -04:00
2017-07-25 11:07:01 -04:00

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.

Example

In

(function () {
}());

Out

_wrapper(function () {
})();

Usage

import wrapFunction from "babel-helper-wrap-function";

wrapFunction(nodePathOfTheFunction, nodeWhichReferencesToTheWrapper);