{"id":15683824,"url":"https://github.com/joehand/dat-download","last_synced_at":"2025-05-07T14:26:43.959Z","repository":{"id":141530462,"uuid":"101446971","full_name":"joehand/dat-download","owner":"joehand","description":"simple dat downloading module","archived":false,"fork":false,"pushed_at":"2023-01-11T18:45:22.000Z","size":169,"stargazers_count":10,"open_issues_count":5,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-15T17:17:11.290Z","etag":null,"topics":["dat"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joehand.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-25T22:36:40.000Z","updated_at":"2020-05-19T03:14:45.000Z","dependencies_parsed_at":"2023-12-09T18:15:09.792Z","dependency_job_id":null,"html_url":"https://github.com/joehand/dat-download","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"f25baeff0b5efbac17f2e8ca1034dce9a6861bd0"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joehand%2Fdat-download","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joehand%2Fdat-download/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joehand%2Fdat-download/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joehand%2Fdat-download/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joehand","download_url":"https://codeload.github.com/joehand/dat-download/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252894123,"owners_count":21820923,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dat"],"created_at":"2024-10-03T17:08:52.543Z","updated_at":"2025-05-07T14:26:43.923Z","avatar_url":"https://github.com/joehand.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dat-download\n\nOne-time file downloads via Dat. Download a single file or subdirectory from a dat. Automatically joins the network and handles everything for you.\n\n[![npm][npm-image]][npm-url]\n[![travis][travis-image]][travis-url]\n[![standard][standard-image]][standard-url]\n\n## Example\n\n```js\nvar datDownload = require('dat-download')\n\ndatDownload('dat://778f8d955175c92e4ced5e4f5563f69bfec0c86cc6f670352c457943666fe639/dat.json', process.cwd(), function (err) {\n    if (err) throw err\n    console.log('done downloading! thanks')\n})\n```\n\nWorks with DNS-type dat keys too!\n\n```js\nvar datDownload = require('dat-download')\n\ndatDownload('dat://beakerbrowser.com/index.html', process.cwd(), function (err) {\n    if (err) throw err\n    console.log('done downloading! thanks')\n})\n```\n\nCan also download a whole dat:\n\n```js\nvar datDownload = require('dat-download')\n\ndatDownload('dat://beakerbrowser.com/', process.cwd(), function (err) {\n    if (err) throw err\n    console.log('done downloading! thanks')\n})\n```\n\n## Install\n\n```\nnpm install dat-download\n```\n\n## API\n\n### `datDownload(datPath, [destination], callback)`\n\n* `datPath` - dat key with subdirectory or file path. If the whole key is specified, it will download to `destination/key`.\n* `destination` - download folder\n\n## License\n\n[MIT](LICENSE.md)\n\n[npm-image]: https://img.shields.io/npm/v/dat-download.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/dat-download\n[travis-image]: https://img.shields.io/travis/joehand/dat-download.svg?style=flat-square\n[travis-url]: https://travis-ci.org/joehand/dat-download\n[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\n[standard-url]: http://npm.im/standard\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoehand%2Fdat-download","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoehand%2Fdat-download","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoehand%2Fdat-download/lists"}