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

jintr

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jintr - npm Package Compare versions

Comparing version 3.1.0 to 3.2.0

22

dist/main.js

@@ -49,9 +49,4 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {

evaluate(input) {
try {
const program = parse(input, { ecmaVersion: 2020 });
__classPrivateFieldSet(this, _Jinter_ast, program.body, "f");
}
catch (e) {
throw new JinterError(e.message);
}
const program = Jinter.parseScript(input);
__classPrivateFieldSet(this, _Jinter_ast, program.body, "f");
this.visitor.setAST(__classPrivateFieldGet(this, _Jinter_ast, "f"));

@@ -68,3 +63,14 @@ return this.visitor.run();

catch (e) {
throw new JinterError(e.message);
const match = e.message.match(/\((\d+):(\d+)\)/);
if (match) {
const line = parseInt(match[1], 10);
const column = parseInt(match[2], 10);
const lines = input.split('\n');
const errorLine = lines[line - 1];
const snippet = errorLine ? errorLine.substring(Math.max(0, column - 10), column + 10) : '';
throw new JinterError(`${e.message.replace(/\(.*\)/, '').trim()} at line ${line}, column ${column}: ${snippet}`, { errorLine });
}
else {
throw new JinterError(e.message);
}
}

@@ -71,0 +77,0 @@ }

{
"name": "jintr",
"version": "3.1.0",
"version": "3.2.0",
"description": "A tiny JavaScript interpreter written in TypeScript.",

@@ -5,0 +5,0 @@ "type": "module",

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