pvenkatakrishnan / fastpath Goto Github PK
View Code? Open in Web Editor NEWA jsonpath parser.
License: MIT License
A jsonpath parser.
License: MIT License
Fastpath seems to be incapable of descending into objects targeted with a filter. Add the following test to bookstore-test.js to see this happening:
t.test('should be able to parse simple object refs', function (t) {
var exp = '$..book[?(@.isbn)].title',
tr = fastpath(exp);
t.deepEqual(tr.evaluate(obj), jsonPath.eval(obj, exp));
t.end();
});
jsonpath correctly returns the titles of the books, but fastpath returns the book objects themselves.
When I do npm run cover
, I get this
index.js -> dist/index.js
lib/fastPath.js -> dist/lib/fastPath.js
Transformation error; return original code
{ [Error: Line 1: Unexpected reserved word]
index: 15,
lineNumber: 1,
column: 16,
description: 'Unexpected reserved word' }
Transformation error; return original code
{ [Error: Line 182: Unexpected token {]
index: 4473,
lineNumber: 182,
column: 20,
description: 'Unexpected token {' }
TAP version 13
# bookstore
# should be able to parse simple object refs
ok 1 should be equivalent
# should be able to parse simple object refs
ok 2 should be equivalent
# should be able to parse simple object refs
ok 3 should be equivalent
....
....
....
....
ok 47 should be equivalent
# should test named patterns
ok 48 should be equivalent
No coverage information was collected, exit without writing coverage information
1..48
# tests 48
# pass 48
# ok
Hi all,
I would really like to use this at work, since it would make life a lot easier. However the fact that you have not included any licensing information in the repo or the readme, prevents me from doing this.
Could you please add an explicit license. Once you have that, I can get approval for the software and you can expect me to also start contributing.
Thanks!
While starting my new project over comparejs, I have written performance tests for fastPath, I observed an issue. You can check it here.
I thought to share with you, in case you want to have a look.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.