I've just pushed a pretty big update to Holster, it now has an API that sits on top of the wire spec. This allows you to run nice queries similar to the original Gun API, such as:
holster.get("hello").put({
things: "I want to add",
which: {
can: "also have nested objects",
},
}, console.log)
It then resolves the query and puts objects on the graph, resolving nested objects as it goes, making extra calls to the wire API as it needs to. The webpack build exposes Holster as a single library, so the previous wire API is now available via holster.wire. I've also added a root node to the graph, so it's also possible to put non-object properties at the root level:
holster.get("key").put("value", console.log)
Check out the tests for more examples! There's also a lot more tests including using mock-socket to add more test coverage to what is now wire.js.
Holster API
It then resolves the query and puts objects on the graph, resolving nested objects as it goes, making extra calls to the wire API as it needs to. The webpack build exposes Holster as a single library, so the previous wire API is now available via
holster.wire
. I've also added a root node to the graph, so it's also possible to put non-object properties at the root level: Check out the tests for more examples! There's also a lot more tests including using mock-socket to add more test coverage to what is now wire.js.