Closed gareth-robinson closed 7 years ago
yes the attributes bit isn't implemented yet. needs a test or two based on the samples in the docs
I've submitted a pull request for this: https://github.com/goofballLogic/ld-query/pull/6. However, it was quite a big change, perhaps you had a different intention for how to solve this.
@gareth-robinson note that I've added documentation to highlight that @id and @index are also considered to be "final" nodes that will return their string content when selected.
I've re-implemented this, hopefully a lot tidier. See pull request https://github.com/goofballLogic/ld-query/pull/9
At the bottom of your Examples you list an example that has an attribute clause: doc.query("so:favouriteReads[@index=pynchon_gp] so:name @value") // "Gravity's Rainbow"
There does not appear to be any implementation for this though.
(also, as an aside, your 'main' entry in package.json is pointing to dist/ld-query.js, which does not exist)