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 3.0.1 to 3.1.0

14

bin.js
#!/usr/bin/env node
const path = require('path');
const ascjs = require('./index.js');
const $ascjs = require('./index.js');
const ascjs = input => {
const output = $ascjs(input);
return noDefault ?
output.replace(`${$ascjs.EXPORT}.default`, 'module.exports') :
output;
};

@@ -10,5 +16,8 @@ const argv = process.argv.slice(2);

let noDefault = false;
const ignore = [];
options.forEach(arg => {
if (/^--ignore=/.test(arg))
if (/^--no-default$/.test(arg))
noDefault = true;
else if (/^--ignore=/.test(arg))
ignore.push.apply(

@@ -33,2 +42,3 @@ ignore,

ascjs --ignore=a.js,b.js sourceFile
ascjs --no-default
ascjs sourceFile destFile

@@ -35,0 +45,0 @@ ascjs sourceFolder destFolder # dest is required

4

package.json
{
"name": "ascjs",
"version": "3.0.1",
"version": "3.1.0",
"description": "ES2015 to CommonJS import/export transformer",

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

"devDependencies": {
"coveralls": "^3.0.0",
"coveralls": "^3.0.7",
"istanbul": "^0.4.5"
}
}

@@ -36,2 +36,3 @@ # ascjs

ascjs --ignore=a.js,b.js sourceFile
ascjs --no-default
ascjs sourceFile

@@ -74,2 +75,7 @@ ascjs sourceFile destFile

### Flags
* `--ignore=...` a comma separated paths to ignore parsing
* `--no-default` remove the `__esModule` flag and export default via `module.exports = `
### Example

@@ -76,0 +82,0 @@ This module can transform the following ES2015+ 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