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

pegjs-util

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pegjs-util - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

2

bower.json
{
"name": "pegjs-util",
"version": "1.3.0",
"version": "1.3.1",
"description": "Utility Class for PEG.js",

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

{
"name": "pegjs-util",
"version": "1.3.0",
"version": "1.3.1",
"description": "Utility Class for PEG.js",

@@ -5,0 +5,0 @@ "keywords": [ "pegjs", "parser", "AST", "unroll" ],

@@ -155,13 +155,25 @@ /*

result.ast = null;
var definedOrElse = function (value, fallback) {
return (typeof value !== "undefined" ? value : fallback);
};
result.error = {
line: definedOrElse(e.location.start.line, 0),
column: definedOrElse(e.location.start.column, 0),
message: e.message,
found: definedOrElse(e.found, ""),
expected: definedOrElse(e.expected, ""),
location: excerpt(txt, definedOrElse(e.location.start.offset, 0))
};
if (e instanceof parser.SyntaxError) {
var definedOrElse = function (value, fallback) {
return (typeof value !== "undefined" ? value : fallback);
};
result.error = {
line: definedOrElse(e.location.start.line, 0),
column: definedOrElse(e.location.start.column, 0),
message: e.message,
found: definedOrElse(e.found, ""),
expected: definedOrElse(e.expected, ""),
location: excerpt(txt, definedOrElse(e.location.start.offset, 0))
};
}
else {
result.error = {
line: 0,
column: 0,
message: e.message,
found: "",
expected: "",
location: excerpt("", 0)
};
}
}

@@ -168,0 +180,0 @@ return result;

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