babel-helper-wrap-function

7.0.0-alpha.16 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i babel-helper-wrap-function

Weekly Downloads

1,460

Version

7.0.0-alpha.16

License

MIT

Last publish

Collaborators

  • hzoo