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.1.5 to 0.1.6

bin/generate_parser.js

7

lib/grammar.js
var dict = require('./dict');
var fs = require('fs');
fs.readFileSync = fs.readFileSync || function() {}

@@ -99,5 +101,8 @@ var grammar = {

[ 'Q_STRING', "$$ = $1" ] ]
}
},
moduleInclude: fs.readFileSync("include/module.js"),
actionInclude: fs.readFileSync("include/action.js")
};
module.exports = grammar;

43

lib/parser.js

@@ -1,11 +0,7 @@

var JisonParser = require('jison').Parser;
var grammar = require('./grammar');
var gparser = require('../generated/parser');
var Parser = function() {
var parser = new JisonParser(grammar);
parser.yy.ast = _ast;
_ast.initialize();
var parser = new gparser.Parser();
return parser;

@@ -17,36 +13,1 @@

module.exports = Parser;
var _ast = {
initialize: function() {
this._nodes = [];
this._node = {};
this._stash = [];
},
set: function(props) {
for (var k in props) this._node[k] = props[k];
return this._node;
},
node: function(obj) {
if (arguments.length) this._node = obj;
return this._node;
},
push: function() {
this._nodes.push(this._node);
this._node = {};
},
unshift: function() {
this._nodes.unshift(this._node);
this._node = {};
},
yield: function() {
var _nodes = this._nodes;
this.initialize();
return _nodes;
}
};
{
"name": "jsonpath",
"description": "Query JavaScript objects with JSONPath expressions. Robust / safe JSONPath engine for Node.js.",
"version": "0.1.5",
"version": "0.1.6",
"author": "david@fmail.co.uk",
"scripts": {
"test": "mocha -u tdd test && jscs lib && jshint lib"
"test": "mocha -u tdd test && jscs lib && jshint lib",
"generate": "node bin/generate_parser.js > generated/parser.js"
},
"dependencies": {
"esprima": "1.2.2",
"jison": "0.3.10",
"jison": "0.4.13",
"static-eval": "0.2.3",

@@ -13,0 +14,0 @@ "underscore": "1.7.0"

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