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

ascjs

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ascjs - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

7

index.js

@@ -5,3 +5,3 @@ const cherow = require('cherow');

const asDefault = name => name === 'default' ? babelified : `exports.${name}`;
const fromDefault = defaultImport => `(m => m.__esModule ? m : {default: m})(${defaultImport})`;
const fromDefault = defaultImport => `(m => m.__esModule ? m.default : m)(${defaultImport})`;

@@ -26,5 +26,4 @@ const replace = {

imported.push(
`const ${specifier.local.name} = ${fromDefault(defaultImport)}.default${EOL}`
`const ${specifier.local.name} = ${fromDefault(defaultImport)}${EOL}`
);
defaultImport = specifier.local.name;
break;

@@ -147,3 +146,3 @@ case 'ImportNamespaceSpecifier':

out.push(length ? code.slice(chunks[length - 1].end) : code);
return out.join('');
return "'use strict';\n" + out.join('');
};

@@ -150,0 +149,0 @@

{
"name": "ascjs",
"version": "0.1.4",
"version": "0.1.5",
"description": "ES2015 to CommonJS import/export transformer",

@@ -5,0 +5,0 @@ "bin": "bin.js",

@@ -80,4 +80,5 @@ # ascjs

```js
const func = (m => m.__esModule ? m : {default: m})(require('./module.js')).default;
const {a, b} = func;
'use strict';
const func = (m => m.__esModule ? m.default : m)(require('./module.js'));
const {a, b} = require('./module.js');
const tmp = require('other');

@@ -84,0 +85,0 @@

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