Socket
Socket
Sign inDemoInstall

es6-module-transpiler-amd-formatter

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

es6-module-transpiler-amd-formatter - npm Package Compare versions

Comparing version 0.2.3 to 0.2.4

LICENSE

21

index.js

@@ -55,3 +55,3 @@ /* jshint node:true, undef:true, unused:true */

/**
* Process a variable declaration found at the top level of the module. Since
* Process a function declaration found at the top level of the module. Since
* we do not need to rewrite exported functions, we can leave function

@@ -64,3 +64,3 @@ * declarations alone.

*/
AMDFormatter.prototype.processFunctionDeclaration = function(mod, nodePath) {
AMDFormatter.prototype.processFunctionDeclaration = function(/* mod, nodePath */) {
return null;

@@ -70,2 +70,15 @@ };

/**
* Process a class declaration found at the top level of the module. Since
* we do not need to rewrite exported classes, we can leave class
* declarations alone.
*
* @param {Module} mod
* @param {ast-types.NodePath} nodePath
* @returns {Array.<ast-types.Node>}
*/
AMDFormatter.prototype.processClassDeclaration = function(/* mod, nodePath */) {
return null;
};
/**
* Because exported references are captured via a closure as part of a getter

@@ -168,4 +181,6 @@ * on the `exports` object, there's no need to rewrite local references to

if (n.FunctionDeclaration.check(declaration)) {
if (n.FunctionDeclaration.check(declaration) ||
n.ClassDeclaration.check(declaration)) {
// export function <name> () {}
// export class Foo {}
return Replacement.swaps(nodePath, [declaration, b.expressionStatement(

@@ -172,0 +187,0 @@ b.callExpression(b.identifier('__es6_export__'), [b.literal(declaration.id.name), declaration.id])

2

package.json
{
"name": "es6-module-transpiler-amd-formatter",
"version": "0.2.3",
"version": "0.2.4",
"description": "ES6 Module Transpiler Extension to Output AMD define() Format.",

@@ -5,0 +5,0 @@ "author": "Caridy Patino <caridy@gmail.com>",

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