Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-helper-remove-or-void

Package Overview
Dependencies
Maintainers
5
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-helper-remove-or-void - npm Package Compare versions

Comparing version 0.4.0-alpha.6546ad11 to 0.4.0-alpha.caaefb4c

12

lib/index.js

@@ -1,3 +0,1 @@

"use strict";
module.exports = function (t) {

@@ -8,8 +6,10 @@ // If we can't remove the expression we'll just replace it with an empty statement.

// with the expression statement instead.
if (path.parentPath.isExpressionStatement({ expression: path.node })) {
if (path.parentPath.isExpressionStatement({
expression: path.node
})) {
path = path.parentPath;
}
} // If we are working with a variable declarator and there is only one then
// we need to look at the parent.
// If we are working with a variable declarator and there is only one then
// we need to look at the parent.
if (path.isVariableDeclarator() && path.parent.declarations[0] === path.node && path.parent.declarations.length === 1) {

@@ -16,0 +16,0 @@ path = path.parentPath;

{
"name": "babel-helper-remove-or-void",
"version": "0.4.0-alpha.6546ad11",
"version": "0.4.0-alpha.caaefb4c",
"description": "",

@@ -5,0 +5,0 @@ "keywords": [

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