New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-transform-es2015-modules-nej

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-es2015-modules-nej - npm Package Compare versions

Comparing version 1.1.3 to 1.1.4

18

index.js

@@ -87,11 +87,16 @@ module.exports = function (babel) {

enter: function enter(path) { // 如果是nej文件,不处理
if (!path.node.body[0]) { // 空文件
return;
}
//define
try {
if (!path.node.body[0]) { // 空文件
return;
}
if (path.node.body[0].expression.callee.name === 'define') {
if (path.node.body[0].expression.callee.name.toLocaleLowerCase() === 'define') {
this.stop = true;
return;
}
if (path.node.body[0].expression.callee.object.name === 'nej' && path.node.body[0].expression.callee.property.name === 'define') {
} catch (e) {}
// nej.define
try {
if (path.node.body[0].expression.callee.object.name.toLocaleLowerCase() === 'nej' && path.node.body[0].expression.callee.property.name === 'define') {
this.stop = true;

@@ -103,2 +108,5 @@ return;

exit: function exit(path) { //从根目录开始遍历
if (this.stop) {
return;
}
const statements = path.node.body; // 获取全部语句

@@ -105,0 +113,0 @@

{
"name": "babel-plugin-transform-es2015-modules-nej",
"version": "1.1.3",
"version": "1.1.4",
"description": "transform es6 module to nej module",

@@ -5,0 +5,0 @@ "main": "index.js",

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