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

JSONPath

Package Overview
Dependencies
Maintainers
1
Versions
12
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.8.5 to 0.9.0

CHANGES.md

14

lib/jsonpath.js

@@ -7,3 +7,4 @@ /* JSONPath 0.8.0 - XPath for JSON

var _ = require('underscore');
var vm = require('vm'),
_ = require('underscore');
exports.eval = jsonPath;

@@ -16,2 +17,3 @@ var cache = {};

wrap: (arg && arg.hasOwnProperty('wrap')) ? arg.wrap : true,
sandbox: (arg && arg.sandbox) ? arg.sandbox : {},
normalize: function(expr) {

@@ -115,4 +117,10 @@ if(cache[expr]) {

eval: function(x, _v, _vname) {
try { return $ && _v && eval(x.replace(/@/g, "_v")); }
catch(e) { throw new SyntaxError("jsonPath: " + e.message + ": " + x.replace(/@/g, "_v").replace(/\^/g, "_a")); }
P.sandbox["_v"] = _v;
try {
return $ && _v && vm.runInNewContext(x.replace(/@/g, "_v"), P.sandbox);
}
catch(e) {
console.log(e);
throw new SyntaxError("jsonPath: " + e.message + ": " + x.replace(/@/g, "_v").replace(/\^/g, "_a"));
}
}

@@ -119,0 +127,0 @@ };

@@ -19,3 +19,3 @@ {

],
"version": "0.8.5",
"version": "0.9.0",
"repository": {

@@ -27,7 +27,7 @@ "type": "git",

"dependencies": {
"underscore": "latest"
"underscore": "1.3.x"
},
"devDependencies": {
"nodeunit": "latest"
"nodeunit": "0.6.x"
}
}
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