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

babel-plugin-react-docgen

Package Overview
Dependencies
Maintainers
4
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-react-docgen - npm Package Compare versions

Comparing version 1.8.2 to 1.8.3

test/fixtures/example-module-exports/actual.js

14

lib/index.js

@@ -140,2 +140,16 @@ 'use strict';

}
// Detect module.exports = className;
} else if (path.node.type === 'ExpressionStatement') {
var expr = path.node.expression;
if (t.isAssignmentExpression(expr)) {
var left = expr.left;
var right = expr.right;
var leftIsModuleExports = t.isMemberExpression(left) && t.isIdentifier(left.object) && t.isIdentifier(left.property) && left.object.name === 'module' && left.property.name === 'exports';
var rightIsIdentifierClass = t.isIdentifier(right) && right.name === className;
return leftIsModuleExports && rightIsIdentifierClass;
}
}

@@ -142,0 +156,0 @@ return false;

2

package.json
{
"version": "1.8.2",
"version": "1.8.3",
"name": "babel-plugin-react-docgen",

@@ -4,0 +4,0 @@ "description": "Babel plugin to add react-docgen info into your code",

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