package
resolve urls, links to a dat key
npm install dat-link-resolveGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
More info on active projects and modules at dat-ecosystem.org ![]()
resolve urls, links to a dat key using common methods
dat://, etc.)datproject.org/6161616161616161616161616161616161616161616161616161616161616161)hyperdrive-key or dat-key headers{key: <dat-key>}npm install dat-link-resolvevar datResolve = require('dat-link-resolve')
datResolve(link, function (err, key) {
console.log('found key', key)
})datResolve(link, callback(err, key))Link can be string or buffer.
Resolution order:
keyTrying to tighten up a bit dat-link-resolve (and its dependencies dat-dns and dat-decode). I am noticing a few inconsistencies as I'm writing dat-shell.
Ideally, I'd like to launch dat-shell like this:
$ dat-shell dat://40a7f6b6147ae695bcbcff432f684c7bb5291ea339c28c1755896cdeb80bd2f9+5/path4and have it open the dat at version 5 and change directory to /path4.
Currently dat-shell google-fonts-kewitz.hashbase.io/fonts/ fails somewhere in dat-link-resolve.
Note that dat-link-resolve also supports other methods, such as detection of dat keys in paths and http headers.
Contributions welcome! Please read the contributing guidelines first.
frando
dev@unbiskant.org
Estimated unpacked size across 18 packages.
423.7 kB
Includes dependencies.
4 direct · 2 outdated