Socket
Socket
Sign inDemoInstall

@babel/plugin-transform-function-name

Package Overview
Dependencies
Maintainers
4
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-transform-function-name - npm Package Compare versions

Comparing version 7.21.4-esm.2 to 7.21.4-esm.3

21

lib/index.js

@@ -1,7 +0,13 @@

import { isRequired } from "@babel/helper-compilation-targets";
import { declare } from "@babel/helper-plugin-utils";
import nameFunction from "@babel/helper-function-name";
export default declare(api => {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _helperCompilationTargets = require("@babel/helper-compilation-targets");
var _helperPluginUtils = require("@babel/helper-plugin-utils");
var _helperFunctionName = require("@babel/helper-function-name");
var _default = (0, _helperPluginUtils.declare)(api => {
api.assertVersion(7);
const supportUnicodeId = !isRequired("transform-unicode-escapes", api.targets());
const supportUnicodeId = !(0, _helperCompilationTargets.isRequired)("transform-unicode-escapes", api.targets());
return {

@@ -13,3 +19,3 @@ name: "transform-function-name",

if (path.key !== "value" && !path.parentPath.isObjectProperty()) {
const replacement = nameFunction(path);
const replacement = (0, _helperFunctionName.default)(path);
if (replacement) path.replaceWith(replacement);

@@ -22,3 +28,3 @@ }

if (value.isFunction()) {
const newNode = nameFunction(value, false, supportUnicodeId);
const newNode = (0, _helperFunctionName.default)(value, false, supportUnicodeId);
if (newNode) value.replaceWith(newNode);

@@ -30,3 +36,4 @@ }

});
exports.default = _default;
//# sourceMappingURL=index.js.map
{
"name": "@babel/plugin-transform-function-name",
"version": "7.21.4-esm.2",
"version": "7.21.4-esm.3",
"description": "Apply ES2015 function.name semantics to all functions",

@@ -20,5 +20,5 @@ "repository": {

"dependencies": {
"@babel/helper-compilation-targets": "7.21.4-esm.2",
"@babel/helper-function-name": "7.21.4-esm.2",
"@babel/helper-plugin-utils": "7.21.4-esm.2"
"@babel/helper-compilation-targets": "7.21.4-esm.3",
"@babel/helper-function-name": "7.21.4-esm.3",
"@babel/helper-plugin-utils": "7.21.4-esm.3"
},

@@ -29,4 +29,4 @@ "peerDependencies": {

"devDependencies": {
"@babel/core": "7.21.4-esm.2",
"@babel/helper-plugin-test-runner": "7.21.4-esm.2"
"@babel/core": "7.21.4-esm.3",
"@babel/helper-plugin-test-runner": "7.21.4-esm.3"
},

@@ -33,0 +33,0 @@ "engines": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc