🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

scopifier

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

scopifier - npm Package Compare versions

Comparing version
1.1.1
to
1.1.2
benchmark.js~

Sorry, the diff of this file is not supported yet

+7
bench:
node_modules/.bin/matcha benchmark/scenarios.js
v8:
node --allow-natives-syntax --trace-opt --trace-deopt benchmark/v8.js
.PHONY: bench v8

Sorry, the diff of this file is not supported yet

+4
-1
{
"name": "scopifier",
"version": "1.1.1",
"version": "1.1.2",
"description": "Scopifier CLI for Context Coloring",

@@ -32,3 +32,6 @@ "main": "scopifier.js",

"esprima": "^1.2.3"
},
"devDependencies": {
"matcha": "^0.6.0"
}
}

@@ -21,2 +21,11 @@ // Copyright (C) 2014-2015 Free Software Foundation, Inc.

// V8 hates try-catch statements and won't optimize a function that uses them.
function tryCatch(fn, failureHandler) {
try {
fn();
} catch (error) {
failureHandler(error);
}
}
// Given code, returns an array of tokens for context-coloring.

@@ -49,3 +58,3 @@ function scopifier(code) {

// Gracefully handle parse errors by doing nothing.
try {
tryCatch(function () {
ast = esprima.parse(code, {

@@ -55,5 +64,5 @@ range: true

analyzedScopes = escope.analyze(ast).scopes;
} catch (error) {
}, function () {
process.exit(1);
}
});

@@ -60,0 +69,0 @@ scopes = [];

Sorry, the diff of this file is not supported yet