You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 7, 2022. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+3-16Lines changed: 3 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -25,14 +25,13 @@ npm install dat-link-resolve
25
25
```js
26
26
var datResolve =require('dat-link-resolve')
27
27
28
-
datResolve(link, function (err, key) {
29
-
console.log('found key', key)
30
-
})
28
+
var key =awaitdatResolve(link)
29
+
console.log('dat key:', key)
31
30
```
32
31
33
32
## API
34
33
35
-
### `datResolve(link, callback(err, key))`
34
+
### `await datResolve(link)`
36
35
37
36
Link can be string or buffer.
38
37
@@ -43,18 +42,6 @@ Resolution order:
43
42
3. Check JSON request response for `key`
44
43
4. Dat-DNS resolution via [dat-dns](https://github.com/datprotocol/dat-dns)
45
44
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.
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
-
58
45
### Examples
59
46
Note that dat-link-resolve also supports other methods, such as detection of dat keys in paths and http headers.
0 commit comments