Comparing version 0.8.2 to 0.8.3
@@ -7,2 +7,3 @@ /* JSONPath 0.8.0 - XPath for JSON | ||
var _ = require('underscore'); | ||
exports.eval = jsonPath; | ||
@@ -13,2 +14,3 @@ var cache = {}; | ||
resultType: arg && arg.resultType || "VALUE", | ||
flatten: arg && arg.flatten || false, | ||
result: [], | ||
@@ -36,3 +38,15 @@ normalize: function(expr) { | ||
store: function(p, v) { | ||
if (p) P.result[P.result.length] = P.resultType == "PATH" ? P.asPath(p) : v; | ||
if (p) { | ||
if (P.resultType == "PATH") { | ||
P.result[P.result.length] = P.asPath(p); | ||
} | ||
else { | ||
if(_.isArray(v) && P.flatten) { | ||
P.result = P.result.concat(v); | ||
} | ||
else { | ||
P.result[P.result.length] = v; | ||
} | ||
} | ||
} | ||
return !!p; | ||
@@ -39,0 +53,0 @@ }, |
{ | ||
"author": "Stefan Goessner", | ||
"name": "JSONPath", | ||
"description": "A JS implementation of JSONPath", | ||
"contributors": [ | ||
{ "name": "Stefan Goessner", "email": "subbu@subbu.org" }, | ||
{ "name": "Mike Brevoort", "email": "mike@brevoort.com" } | ||
], | ||
"version": "0.8.2", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/s3u/JSONPath.git" | ||
}, | ||
"main" : "./lib/jsonpath", | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"nodeunit": "latest" | ||
} | ||
"author": "Stefan Goessner", | ||
"name": "JSONPath", | ||
"description": "A JS implementation of JSONPath", | ||
"contributors": [ | ||
{ | ||
"name": "Prof. G�ssner", | ||
"email": "stefan.goessner@fh-dortmund.de" | ||
}, | ||
{ | ||
"name": "Subbu Allamaraju", | ||
"email": "subbu@subbu.org" | ||
}, | ||
{ | ||
"name": "Mike Brevoort", | ||
"email": "mike@brevoort.com" | ||
} | ||
], | ||
"version": "0.8.3", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/s3u/JSONPath.git" | ||
}, | ||
"main": "./lib/jsonpath", | ||
"dependencies": { | ||
"underscore": "latest" | ||
}, | ||
"devDependencies": { | ||
"nodeunit": "latest" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
17398
10
343
0
1
2
+ Addedunderscore@latest
+ Addedunderscore@1.13.7(transitive)