Socket
Socket
Sign inDemoInstall

just-parse

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

just-parse - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

14

index.js

@@ -12,5 +12,3 @@ var acorn = require('acorn');

var ast;
var parserOptions = {
ecmaVersion: 6
};
var parserOptions = module.exports._getParserOptions();

@@ -27,1 +25,11 @@ // Returns an object if ok, if not, returns an empty array

};
/**
* Exposed for testing
* @return {Object}
*/
module.exports._getParserOptions = function() {
return {
ecmaVersion: 6
};
};
{
"name": "just-parse",
"version": "1.0.1",
"version": "1.0.2",
"description": "Enough configuration, just parse the goddamn file",

@@ -28,4 +28,5 @@ "main": "index.js",

"jscs": "~1.11.3",
"mocha": "~2.1.0"
"mocha": "~2.1.0",
"sinon": "~1.15.4"
}
}

@@ -5,2 +5,3 @@ var justParse = require('../');

var fs = require('fs');
var sinon = require('sinon');

@@ -25,2 +26,13 @@ describe('just-parse', function() {

});
it('should parse scripts even with a source type of module', function() {
var stub = sinon.stub(justParse, '_getParserOptions').returns({
ecmaVersion: 6,
sourceType: 'module'
});
var ast = justParse('#!/usr/bin/env node\nvar foo = 1;');
assert(ast instanceof Object);
stub.restore();
});
});
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