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

jsonpath

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsonpath - npm Package Compare versions

Comparing version 0.2.3 to 0.2.4

4

lib/parser.js

@@ -10,3 +10,5 @@ var grammar = require('./grammar');

parser.yy.parseError = function() {
parser.yy.ast.initialize();
if (parser.yy.ast) {
parser.yy.ast.initialize();
}
_parseError.apply(parser, arguments);

@@ -13,0 +15,0 @@ }

{
"name": "jsonpath",
"description": "Query JavaScript objects with JSONPath expressions. Robust / safe JSONPath engine for Node.js.",
"version": "0.2.3",
"version": "0.2.4",
"author": "david@fmail.co.uk",

@@ -6,0 +6,0 @@ "scripts": {

@@ -149,13 +149,17 @@ var assert = require('assert');

test('parse path with leading member component throws', function() {
assert.throws(function() { var path = jp.parse('.store') })
assert.throws(function(e) { var path = jp.parse('.store') }, /Expecting 'DOLLAR'/)
});
test('parse path with leading descendant member throws', function() {
assert.throws(function() { var path = jp.parse('..store') })
assert.throws(function() { var path = jp.parse('..store') }, /Expecting 'DOLLAR'/)
});
test('leading script throws', function() {
assert.throws(function() { var path = jp.parse('()') })
assert.throws(function() { var path = jp.parse('()') }, /Unrecognized text/)
});
test('first time friendly error', function() {
assert.throws(function() { (new jp.JSONPath).parse('$...') }, /Expecting 'STAR'/)
});
});

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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