Permalink
Browse files

tweak comments

  • Loading branch information...
dchester committed Jun 17, 2016
1 parent aca0bdc commit 785b6ef82bbcd8b2b3d2c5cdc0d4c27ecbd11755
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/index.js
  2. +1 −1 test/sugar.js
View
@@ -36,7 +36,7 @@ JSONPath.prototype.apply = function(obj, string, fn) {
assert.equal(typeof fn, "function", "fn needs to be function")
var nodes = this.nodes(obj, string).sort(function(a, b) {
//Sort node to start from inner nodes and move to the root.
// sort nodes so we apply from the bottom up
return b.path.length - a.path.length;
});
View
@@ -17,7 +17,7 @@ suite('sugar', function() {
assert.equal(data.z.a, 101);
});
test('apply method to recursive object', function() {
test('apply method applies survives structural changes', function() {
var data = {a: {b: [1, {c: [2,3]}]}};
jp.apply(data, '$..*[?(@.length > 1)]', function(array) {
return array.reverse();

0 comments on commit 785b6ef

Please sign in to comment.