blob: 25b7eaa25f1800468b794d86e06e0c8125b0eab0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# @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**
```js
(function () {
}());
```
**Out**
```js
_wrapper(function () {
})();
```
## Usage
```js
import wrapFunction from "@babel/helper-wrap-function";
wrapFunction(nodePathOfTheFunction, nodeWhichReferencesToTheWrapper);
```
|