webdb icon indicating copy to clipboard operation
webdb copied to clipboard

Pass options to DatArchive

Open garbados opened this issue 7 years ago • 3 comments

WebDB uses DatArchive's defaults and does not pass user options to it. I'd like to be able to pass options through in order to, for example, use custom discovery servers.

garbados avatar Dec 22 '17 18:12 garbados

Ok sure. What would be the ideal way to pass them? As opts in indexArchive(), or somewhere else?

pfrazee avatar Dec 22 '17 18:12 pfrazee

opts in indexArchive makes sense, like { dat: {...} } so for example:

archive = typeof archive === 'string' ? new (this.DatArchive)(archive)(opts.dat) : archive

I'd be happy to put together a PR later today.

garbados avatar Dec 22 '17 18:12 garbados

Sure that works for me

pfrazee avatar Dec 22 '17 18:12 pfrazee