Skip to content
This repository was archived by the owner on Jan 7, 2022. It is now read-only.

Commit e1582ae

Browse files
committed
update docs
1 parent 553d0d0 commit e1582ae

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

README.md

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,13 @@ npm install dat-link-resolve
2525
```js
2626
var datResolve = require('dat-link-resolve')
2727

28-
datResolve(link, function (err, key) {
29-
console.log('found key', key)
30-
})
28+
var key = await datResolve(link)
29+
console.log('dat key:', key)
3130
```
3231

3332
## API
3433

35-
### `datResolve(link, callback(err, key))`
34+
### `await datResolve(link)`
3635

3736
Link can be string or buffer.
3837

@@ -43,18 +42,6 @@ Resolution order:
4342
3. Check JSON request response for `key`
4443
4. Dat-DNS resolution via [dat-dns](https://github.com/datprotocol/dat-dns)
4544

46-
## Refering to dats
47-
Trying 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.
48-
49-
Ideally, I'd like to launch dat-shell like this:
50-
```sh
51-
$ dat-shell dat://40a7f6b6147ae695bcbcff432f684c7bb5291ea339c28c1755896cdeb80bd2f9+5/path4
52-
```
53-
54-
and have it open the dat at version 5 and change directory to /path4.
55-
56-
Currently ```dat-shell google-fonts-kewitz.hashbase.io/fonts/``` [fails somewhere in dat-link-resolve](https://github.com/millette/dat-shell/issues/5).
57-
5845
### Examples
5946
Note that dat-link-resolve also supports other methods, such as detection of dat keys in paths and http headers.
6047

0 commit comments

Comments
 (0)