babel-helper-wrap-function

Helper to wrap functions inside a function call.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
babel-helper-wrap-function
7.0.0-alpha.166 years ago6 years agoMinified + gzip package size for babel-helper-wrap-function in KB

Readme

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);