Skip to content

Commit

Permalink
use @evxn/jsonpath per dchester/jsonpath#57 (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
srl295 committed Jul 10, 2018
1 parent b98283e commit 0227516
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion lib/flatten.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

const jsonpath = require('jsonpath');
const jsonpath = require('@evxn/jsonpath');

/**
* Flatten a deeply nested object into its jsonpath equivalent
Expand Down
36 changes: 18 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@
"promtie": "^0.5.0"
},
"dependencies": {
"jsonpath": "^1.0.0"
"@evxn/jsonpath": "^1.3.4"
}
}
2 changes: 1 addition & 1 deletion test/flatten1.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"bar": "bar",
"$.baz.quux": "true",
"$.baz.hey": "hi",
"$.baz[\"π\"]": "3.14159",
"$.baz['π']": "3.14159",
"$.list[0]": "a",
"$.list[1]": "b",
"$.list[2]": "c"
Expand Down
2 changes: 1 addition & 1 deletion test/flatten1r.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"bar": "бар",
"$.baz.quux": "труе",
"$.baz.hey": "хи",
"$.baz[\"π\"]": "3.14159",
"$.baz['π']": "3.14159",
"$.list[0]": "а",
"$.list[1]": "б",
"$.list[2]": "ц"
Expand Down
2 changes: 1 addition & 1 deletion test/flatten1x.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"$.bar": "bar",
"$.baz.quux": "true",
"$.baz.hey": "hi",
"$.baz[\"π\"]": "3.14159",
"$.baz['π']": "3.14159",
"$.list[0]": "a",
"$.list[1]": "b",
"$.list[2]": "c"
Expand Down
8 changes: 4 additions & 4 deletions test/flatten3.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"$.buttons[\"agħfas\"]": "click the button",
"$.buttons['agħfas']": "click the button",
"$.menus.color.green": "verde",
"$.menus.color.red": "rojo",
"$.menus.decaf": "false",
"$.menus[\"font size\"][0]": "tall",
"$.menus[\"font size\"][1]": "grande",
"$.menus[\"font size\"][2]": "venti"
"$.menus['font size'][0]": "tall",
"$.menus['font size'][1]": "grande",
"$.menus['font size'][2]": "venti"
}

0 comments on commit 0227516

Please sign in to comment.