Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pfrazee/parse-dat-url
Node url.parse updated to support versioned dat URLs.
https://github.com/pfrazee/parse-dat-url
Last synced: 2 months ago
JSON representation
Node url.parse updated to support versioned dat URLs.
- Host: GitHub
- URL: https://github.com/pfrazee/parse-dat-url
- Owner: pfrazee
- Created: 2017-04-30T03:33:23.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-07-31T19:32:44.000Z (over 5 years ago)
- Last Synced: 2024-10-24T16:51:55.039Z (2 months ago)
- Language: JavaScript
- Size: 8.79 KB
- Stars: 20
- Watchers: 4
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-dat - parse-dat-url - node's `url.parse` updated to support versioned dat url's (Using Dat / Dat Link Utilties)
README
# parse-dat-url
Node url.parse updated to support versioned dat URLs.
```js
var parse = require('parse-dat-url')parse('dat://584faa05d394190ab1a3f0240607f9bf2b7e2bd9968830a11cf77db0cea36a21+v1.0.0/path/to/file.txt')
/* => {
protocol: 'dat:',
slashes: true,
auth: null,
host: '584faa05d394190ab1a3f0240607f9bf2b7e2bd9968830a11cf77db0cea36a21',
port: null,
hostname: '584faa05d394190ab1a3f0240607f9bf2b7e2bd9968830a11cf77db0cea36a21',
hash: null,
search: null,
query: null,
pathname: '/path/to/file.txt',
path: '/path/to/file.txt',
href: 'dat://584faa05d394190ab1a3f0240607f9bf2b7e2bd9968830a11cf77db0cea36a21+v1.0.0/path/to/file.txt',
version: 'v1.0.0'
}*/
```