webdb
webdb copied to clipboard
pass options through to DatArchive; update readme
Addresses issue https://github.com/beakerbrowser/webdb/issues/13 by passing the dat
attribute of the opts
parameter of indexArchive
and unindexArchive
to DatArchive as its second parameter. I've also updated the README to reflect this change.
Even with this PR, you won't be able to pass options directly to Dat until this node-dat-archive PR is also merged. Even then, the interface will be a little clunky:
await webdb.indexArchive('dat://foo.com', {
dat: {
datOptions: { ... }
}
})
Appreciate the PR! I agree this is a bit clunky. I was thinking about ways to clean it up and then thought, why not instantiate and pass in the DatArchive
instance yourself?