New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

es3-safe-recast

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

es3-safe-recast - npm Package Compare versions

Comparing version 0.0.0 to 0.0.1

README.md

14

index.js

@@ -35,8 +35,16 @@ var recast = require('recast');

module.exports.compile = function(source) {
var ast = recast.parse(source);
new ES6Safe().visit(ast);
var code = recast.print(ast).code;
var ast, code;
if (TEST_REGEX.test(source)) {
ast = recast.parse(source);
new ES6Safe().visit(ast);
code = recast.print(ast).code;
} else {
code = source;
}
return code;
};
var TEST_REGEX = module.exports.TEST_REGEX = /catch|finally/i;
module.exports.visit = function(ast) {

@@ -43,0 +51,0 @@ new ES6Safe().visit(ast);

{
"name": "es3-safe-recast",
"version": "0.0.0",
"version": "0.0.1",
"description": "esprima/recast es3 safe compile step",

@@ -5,0 +5,0 @@ "main": "index.js",

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