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

jsdc

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsdc - npm Package Compare versions

Comparing version 0.4.3 to 0.4.4

2

package.json
{
"name": "jsdc",
"version": "0.4.3",
"version": "0.4.4",
"description": "compiler ecmascript6 to ecmascript5",

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

@@ -1,4 +0,5 @@

# Javascript Downcast
Javascript Downcast
====
### compiler ecmascript6 to ecmascript5
compiler ecmascript6 to ecmascript5

@@ -5,0 +6,0 @@ [![NPM version](https://badge.fury.io/js/jsdc.png)](https://npmjs.org/package/jsdc)

@@ -31,2 +31,17 @@ var homunculus = require('homunculus');

}
//import id from "string"
else if(one.name() == JsNode.IMPORTCAULSE
&& one.size() == 1
&& one.first().name() == JsNode.TOKEN) {
var id = one.first().token().content();
var last = node.last();
if(last.name() != JsNode.FROMCAULSE) {
last = last.prev();
}
self.jsdc.append('var ' + id);
self.jsdc.append('=require(');
self.jsdc.append(last.last().token().content());
self.jsdc.append(');');
}
//import ids from "string",import {ids} from "string"
else {

@@ -72,3 +87,3 @@ var ids = getIds(one);

else if(s == 'default') {
this.jsdc.append('module.exports=');
this.jsdc.append('exports.default=');
this.jsdc.ignore(node.leaf(0), 'module4');

@@ -75,0 +90,0 @@ this.jsdc.ignore(node.leaf(1), 'module5');

@@ -32,2 +32,17 @@ define(function(require, exports, module) {

}
//import id from "string"
else if(one.name() == JsNode.IMPORTCAULSE
&& one.size() == 1
&& one.first().name() == JsNode.TOKEN) {
var id = one.first().token().content();
var last = node.last();
if(last.name() != JsNode.FROMCAULSE) {
last = last.prev();
}
self.jsdc.append('var ' + id);
self.jsdc.append('=require(');
self.jsdc.append(last.last().token().content());
self.jsdc.append(');');
}
//import ids from "string",import {ids} from "string"
else {

@@ -73,3 +88,3 @@ var ids = getIds(one);

else if(s == 'default') {
this.jsdc.append('module.exports=');
this.jsdc.append('exports.default=');
this.jsdc.ignore(node.leaf(0), 'module4');

@@ -76,0 +91,0 @@ this.jsdc.ignore(node.leaf(1), 'module5');

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