@babel/helper-wrap-function
Advanced tools
Comparing version 7.21.4-esm.3 to 7.21.4-esm.4
@@ -1,10 +0,4 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = wrapFunction; | ||
var _helperFunctionName = require("@babel/helper-function-name"); | ||
var _template = require("@babel/template"); | ||
var _t = require("@babel/types"); | ||
import nameFunction from "@babel/helper-function-name"; | ||
import template from "@babel/template"; | ||
import * as _t from "@babel/types"; | ||
const { | ||
@@ -20,3 +14,3 @@ blockStatement, | ||
} = _t; | ||
const buildAnonymousExpressionWrapper = _template.default.expression(` | ||
const buildAnonymousExpressionWrapper = template.expression(` | ||
(function () { | ||
@@ -29,3 +23,3 @@ var REF = FUNCTION; | ||
`); | ||
const buildNamedExpressionWrapper = _template.default.expression(` | ||
const buildNamedExpressionWrapper = template.expression(` | ||
(function () { | ||
@@ -39,3 +33,3 @@ var REF = FUNCTION; | ||
`); | ||
const buildDeclarationWrapper = _template.default.statements(` | ||
const buildDeclarationWrapper = template.statements(` | ||
function NAME(PARAMS) { return REF.apply(this, arguments); } | ||
@@ -104,3 +98,3 @@ function REF() { | ||
const returnFn = container.callee.body.body[1].argument; | ||
(0, _helperFunctionName.default)({ | ||
nameFunction({ | ||
node: returnFn, | ||
@@ -119,3 +113,3 @@ parent: path.parent, | ||
} | ||
function wrapFunction(path, callId, noNewArrows = true, ignoreFunctionLength = false) { | ||
export default function wrapFunction(path, callId, noNewArrows = true, ignoreFunctionLength = false) { | ||
if (path.isMethod()) { | ||
@@ -122,0 +116,0 @@ classOrObjectMethod(path, callId); |
{ | ||
"name": "@babel/helper-wrap-function", | ||
"version": "7.21.4-esm.3", | ||
"version": "7.21.4-esm.4", | ||
"description": "Helper to wrap functions inside a function call.", | ||
@@ -17,6 +17,6 @@ "repository": { | ||
"dependencies": { | ||
"@babel/helper-function-name": "7.21.4-esm.3", | ||
"@babel/template": "7.21.4-esm.3", | ||
"@babel/traverse": "7.21.4-esm.3", | ||
"@babel/types": "7.21.4-esm.3" | ||
"@babel/helper-function-name": "7.21.4-esm.4", | ||
"@babel/template": "7.21.4-esm.4", | ||
"@babel/traverse": "7.21.4-esm.4", | ||
"@babel/types": "7.21.4-esm.4" | ||
}, | ||
@@ -23,0 +23,0 @@ "engines": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6
15198
116
+ Added@babel/code-frame@7.21.4-esm.4(transitive)
+ Added@babel/generator@7.21.4-esm.4(transitive)
+ Added@babel/helper-environment-visitor@7.21.4-esm.4(transitive)
+ Added@babel/helper-function-name@7.21.4-esm.4(transitive)
+ Added@babel/helper-hoist-variables@7.21.4-esm.4(transitive)
+ Added@babel/helper-split-export-declaration@7.21.4-esm.4(transitive)
+ Added@babel/helper-string-parser@7.21.4-esm.4(transitive)
+ Added@babel/helper-validator-identifier@7.21.4-esm.4(transitive)
+ Added@babel/highlight@7.21.4-esm.4(transitive)
+ Added@babel/parser@7.21.4-esm.4(transitive)
+ Added@babel/template@7.21.4-esm.4(transitive)
+ Added@babel/traverse@7.21.4-esm.4(transitive)
+ Added@babel/types@7.21.4-esm.4(transitive)
- Removed@babel/code-frame@7.21.4-esm.3(transitive)
- Removed@babel/generator@7.21.4-esm.3(transitive)
- Removed@babel/helper-environment-visitor@7.21.4-esm.3(transitive)
- Removed@babel/helper-function-name@7.21.4-esm.3(transitive)
- Removed@babel/helper-hoist-variables@7.21.4-esm.3(transitive)
- Removed@babel/helper-split-export-declaration@7.21.4-esm.3(transitive)
- Removed@babel/helper-string-parser@7.21.4-esm.3(transitive)
- Removed@babel/helper-validator-identifier@7.21.4-esm.3(transitive)
- Removed@babel/highlight@7.21.4-esm.3(transitive)
- Removed@babel/parser@7.21.4-esm.3(transitive)
- Removed@babel/template@7.21.4-esm.3(transitive)
- Removed@babel/traverse@7.21.4-esm.3(transitive)
- Removed@babel/types@7.21.4-esm.3(transitive)
Updated@babel/template@7.21.4-esm.4
Updated@babel/traverse@7.21.4-esm.4
Updated@babel/types@7.21.4-esm.4