# url-dat

> put files from urls into dat

Latest version **1.1.0** (published 2016-12-15) · ISC license · 0 weekly downloads

## Install

```sh
npm install url-dat
pnpm add url-dat
yarn add url-dat
bun add url-dat
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2016-12-15 |
| First published | 2016-07-14 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Joe Hand |
| Maintainers | jhand |

## Links

- npm: https://www.npmjs.com/package/url-dat
- Repository: https://github.com/joehand/url-dat
- Homepage: https://github.com/joehand/url-dat#readme
- Issues: https://github.com/joehand/url-dat/issues
- npm.io page: https://npm.io/package/url-dat

## Dependencies (3)

- [pump](https://npm.io/package/pump.md) ^1.0.1
- [tar-dat](https://npm.io/package/tar-dat.md) ^1.0.0
- [url-tar](https://npm.io/package/url-tar.md) ^1.0.0

## Recent versions

- 1.1.0 (latest) — 2016-12-15
- 1.0.1 — 2016-12-15
- 1.0.0 — 2016-07-14

## README

# Urls to Dat

Put files from urls into a hyperdrive archive

See other modules for more info:

* [tar-dat](https://github.com/joehand/tar-dat): streams tarball into dat
* [url-tar](https://github.com/joehand/url-tar): puts body from url into tar

## Usage

`urlDat(urls, archive, cb)`

```javascript

var hyperdrive = require('hyperdrive')
var swarm = require('hyperdrive-archive-swarm')
var memdb = require('memdb')
var urlDat = require('url-dat')

var drive = hyperdrive(memdb())
var archive = drive.createArchive()

var urls = ['http://google.com', 'http://npmjs.com']

urlDat(urls, archive, function (err) {
  if (err) throw err
  archive.finalize(function (err) { 
    if (err) throw err
    console.log('sharing key: ', archive.key.toString('hex'))
    swarm(archive)
  })
})
```

---
_Source: https://npm.io/package/url-dat · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
