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.7 to 0.2.8

7

lib/handlers.js

@@ -68,3 +68,3 @@ var aesprim = require('./aesprim');

if (is_array(partial.value)) {
var args = component.expression.value.split(':');
var args = component.expression.value.split(':').map(_parse_nullable_int);
var values = partial.value.map(function(v, i) { return { value: v, path: partial.path.concat(i) } });

@@ -253,2 +253,7 @@ return slice.apply(null, [values].concat(args));

function _parse_nullable_int(val) {
var sval = String(val);
return sval.match(/^-?[0-9]+$/) ? parseInt(sval) : null;
}
module.exports = Handlers;
module.exports = function(arr, start, end, step) {
if (typeof start == 'string') throw new Error("start cannot be a string");
if (typeof end == 'string') throw new Error("end cannot be a string");
if (typeof step == 'string') throw new Error("step cannot be a string");
var len = arr.length;

@@ -4,0 +8,0 @@

2

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

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

@@ -32,3 +32,8 @@ var assert = require('assert');

test('negative slices', function() {
var results = jp.query(data, "$..book[-1:].title");
assert.deepEqual(results, ['The Lord of the Rings']);
});
});

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