drive-or-core
I'm trying to figure out if something is a hyperdrive archive or hypercore feed. Maybe you are too?
Usage
Checking a single feed for what type it is:
var driveOrCore = var feed = core
Trying to figure out which of two feeds is metadata (vs content):
var driveOrCore = var feed1 = corevar feed2 = core
API
driveOrCore(feed, [feed2], cb)
Callback returns with cb(err, 'archive|feed', key)
where key
is the feed key or archive key.
See test.js
for all the use cases!
TODO
Sometimes it's more helpful to pass a just key rather than a feed. But that requires making a database and connecting to a swarm (making this module much larger and opinionated). For now you can see how that works in key.js
but more use cases will be helpful in how to implement that.
License
MIT