{"_id":"dat-folder-db","_rev":"8-1eb99154175fe71069f34bfb3f54caa4","name":"dat-folder-db","description":"create .dat folders compatible with the dat CLI","dist-tags":{"latest":"2.1.3"},"versions":{"1.0.0":{"name":"dat-folder-db","version":"1.0.0","description":"Wrapper of level to create/resume a `.dat` folder database. If there is an existing `.dat` folder, it will get the key of the existing dat, allowing it to be resumed.","main":"index.js","scripts":{"test":"standard && tape test.js | tap-spec"},"repository":{"type":"git","url":"git+https://github.com/joehand/dat-folder-db.git"},"author":{"name":"Joe Hand","email":"joe@hand.email","url":"https://joeahand.com/"},"license":"MIT","bugs":{"url":"https://github.com/joehand/dat-folder-db/issues"},"homepage":"https://github.com/joehand/dat-folder-db#readme","dependencies":{"level-party":"^3.0.4"},"devDependencies":{"dat-encoding":"^3.0.1","hyperdrive":"^7.6.0","hyperdrive-archive-swarm":"^4.1.6","random-access-file":"^1.3.1","rimraf":"^2.5.4","tap-spec":"^4.1.1","tape":"^4.6.2"},"gitHead":"b900106def2e36fea2619c017e479b4748edda60","_id":"dat-folder-db@1.0.0","_shasum":"cf46d32e4315a0fdb9ad5aeeeeadb5c971de9460","_from":".","_npmVersion":"3.10.6","_nodeVersion":"6.5.0","_npmUser":{"name":"jhand","email":"joe@hand.email"},"dist":{"shasum":"cf46d32e4315a0fdb9ad5aeeeeadb5c971de9460","tarball":"https://registry.npmjs.org/dat-folder-db/-/dat-folder-db-1.0.0.tgz","integrity":"sha512-i5HiiH6QILgyh3/C8XvYTGUK9H+dwHdAHKhwGf3AHhFI01hLAqvdEcCmw/Zpf+hsr6484jZegWewIVillkkEIg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICwKQW9Q9flfO2yNGdpoS6raM8nWnNybnlZWR8ukuqXJAiEAhqAj1fwb1397PCQkkbIq+wSrBypYlD7FwSE/ASOhUos="}]},"maintainers":[{"name":"jhand","email":"joe@hand.email"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/dat-folder-db-1.0.0.tgz_1476379398389_0.7019427756313235"}},"2.0.0":{"name":"dat-folder-db","version":"2.0.0","description":"Wrapper of level to create/resume a `.dat` folder database. If there is an existing `.dat` folder, it will get the key of the existing dat, allowing it to be resumed.","main":"index.js","scripts":{"test":"standard && tape test.js | tap-spec"},"repository":{"type":"git","url":"git+https://github.com/joehand/dat-folder-db.git"},"author":{"name":"Joe Hand","email":"joe@hand.email","url":"https://joeahand.com/"},"license":"MIT","bugs":{"url":"https://github.com/joehand/dat-folder-db/issues"},"homepage":"https://github.com/joehand/dat-folder-db#readme","dependencies":{"dat-encoding":"^3.0.1","level":"^1.5.0"},"devDependencies":{"dat-encoding":"^3.0.1","hyperdrive":"^7.6.0","hyperdrive-archive-swarm":"^4.1.6","random-access-file":"^1.3.1","rimraf":"^2.5.4","tap-spec":"^4.1.1","tape":"^4.6.2"},"gitHead":"f486c9aad43c2f11e027bf6a3d671c7210d734f7","_id":"dat-folder-db@2.0.0","_shasum":"70ddf424f2b162853bea56b100c0046420d3e5b9","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"jhand","email":"joe@hand.email"},"dist":{"shasum":"70ddf424f2b162853bea56b100c0046420d3e5b9","tarball":"https://registry.npmjs.org/dat-folder-db/-/dat-folder-db-2.0.0.tgz","integrity":"sha512-Zy7i1SjaOWqL2qnx/mZStODPF81xRQ4bIyaNC2tCokEt8NmX8znqb1BvrKAGUK2EanYoWR/SLW+qffnK49ZQWg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDVIjFbB92J8FtuoEwang7lyeFDADP0yo2Cd1Qc3SlVxAIgb46FkDzbryCe3oFONIGUwOD46dc8nLTmSG1oEWbY/yU="}]},"maintainers":[{"name":"jhand","email":"joe@hand.email"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/dat-folder-db-2.0.0.tgz_1479416379236_0.7189322842750698"}},"2.1.0":{"name":"dat-folder-db","version":"2.1.0","description":"Make Dat CLI compatible databases. A database made with `dat-folder-db` can be resumed with the Dat CLI.","main":"index.js","scripts":{"test":"standard && tape test.js | tap-spec"},"repository":{"type":"git","url":"git+https://github.com/joehand/dat-folder-db.git"},"author":{"name":"Joe Hand","email":"joe@hand.email","url":"https://joeahand.com/"},"license":"MIT","bugs":{"url":"https://github.com/joehand/dat-folder-db/issues"},"homepage":"https://github.com/joehand/dat-folder-db#readme","dependencies":{"dat-encoding":"^3.0.1","level":"^1.5.0"},"devDependencies":{"dat-encoding":"^3.0.1","hyperdrive":"^7.6.0","hyperdrive-archive-swarm":"^4.1.6","random-access-file":"^1.3.1","rimraf":"^2.5.4","tap-spec":"^4.1.1","tape":"^4.6.2"},"gitHead":"58145985f17179b3fb90093682f1e518be0254fb","_id":"dat-folder-db@2.1.0","_shasum":"b7a1b440a8d6b21c09413494d510006105dfdd63","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"jhand","email":"joe@hand.email"},"dist":{"shasum":"b7a1b440a8d6b21c09413494d510006105dfdd63","tarball":"https://registry.npmjs.org/dat-folder-db/-/dat-folder-db-2.1.0.tgz","integrity":"sha512-p4o1vPWlvrbgW+RI5ytG44aNs2hYxUPATV+xETWxmJ7Aalq0x4nMjPeWFZ7Yl0dW/QfR9x9E0lhC08zuUV9gag==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD21xjzDkb7VHzeFWldcpashEPrjOaZZb45l0D9nPCdRgIhAIrTPmOihCjoef2jPmq+o7B1mWkUW3H/N/1hZArZlsDs"}]},"maintainers":[{"name":"jhand","email":"joe@hand.email"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/dat-folder-db-2.1.0.tgz_1479493145474_0.804583532968536"}},"2.1.1":{"name":"dat-folder-db","version":"2.1.1","description":"create .dat folders compatible with the dat CLI","main":"index.js","scripts":{"test":"standard && tape test.js | tap-spec"},"repository":{"type":"git","url":"git+https://github.com/joehand/dat-folder-db.git"},"author":{"name":"Joe Hand","email":"joe@hand.email","url":"https://joeahand.com/"},"license":"MIT","bugs":{"url":"https://github.com/joehand/dat-folder-db/issues"},"homepage":"https://github.com/joehand/dat-folder-db#readme","dependencies":{"dat-encoding":"^3.0.1","level":"^1.5.0"},"devDependencies":{"hyperdrive":"^7.6.0","rimraf":"^2.5.4","standard":"^8.5.0","tap-spec":"^4.1.1","tape":"^4.6.2"},"gitHead":"7ee60798c6ec80b533a0cfc06bc9e973f3d82cab","_id":"dat-folder-db@2.1.1","_shasum":"75f97264b7105efd814ef327fbf181cc696fd913","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"jhand","email":"joe@hand.email"},"dist":{"shasum":"75f97264b7105efd814ef327fbf181cc696fd913","tarball":"https://registry.npmjs.org/dat-folder-db/-/dat-folder-db-2.1.1.tgz","integrity":"sha512-eoXgRw/L6TDDXlEnBYl7bTcr5PSboSHHsCyiBK1P3mAXKq4ZPTu6HsyJ1/927/B/nllhWjXjyzLCC+cQvAHxqg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCM/XG5qwcKCpgsk5J3q00llAgZiqyBykCtqhkLS0UmmwIhAL0Vwk448v6nDubfwMv4HDa6etmicP8UTR0XAtfwjY6Y"}]},"maintainers":[{"name":"jhand","email":"joe@hand.email"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/dat-folder-db-2.1.1.tgz_1480464900569_0.2814999595284462"}},"2.1.2":{"name":"dat-folder-db","version":"2.1.2","description":"create .dat folders compatible with the dat CLI","main":"index.js","scripts":{"test":"standard && tape test.js | tap-spec"},"repository":{"type":"git","url":"git+https://github.com/joehand/dat-folder-db.git"},"author":{"name":"Joe Hand","email":"joe@hand.email","url":"https://joeahand.com/"},"license":"MIT","bugs":{"url":"https://github.com/joehand/dat-folder-db/issues"},"homepage":"https://github.com/joehand/dat-folder-db#readme","dependencies":{"dat-encoding":"^3.0.1","level":"^1.5.0"},"devDependencies":{"hyperdrive":"^7.6.0","rimraf":"^2.5.4","standard":"^8.5.0","tap-spec":"^4.1.1","tape":"^4.6.2"},"gitHead":"356d8e490a6944a075863d2ecb5e5b3ad7cf6c45","_id":"dat-folder-db@2.1.2","_shasum":"a4627c67f8777903b258371ab6f25679cb2b776a","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"jhand","email":"joe@hand.email"},"dist":{"shasum":"a4627c67f8777903b258371ab6f25679cb2b776a","tarball":"https://registry.npmjs.org/dat-folder-db/-/dat-folder-db-2.1.2.tgz","integrity":"sha512-gqDxs9hlxdZ4czvbH6J0TNZQfFxLVYLkcroWLeScS1IIk2jIHrRkv6uDT7YSJGNGpJVhR1V5U4Qcgoek6IQBWg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDemeP8w2St7pT7Od06fS6mdzDMQowX2nfi9LL94sfP4QIhAPUA7BM8f4170yNMGBwhlOXtkL0JnfvDWyqu7YnC+rGB"}]},"maintainers":[{"name":"jhand","email":"joe@hand.email"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/dat-folder-db-2.1.2.tgz_1480523727727_0.5425412459298968"}},"2.1.3":{"name":"dat-folder-db","version":"2.1.3","description":"create .dat folders compatible with the dat CLI","main":"index.js","scripts":{"test":"standard && tape test.js | tap-spec"},"repository":{"type":"git","url":"git+https://github.com/joehand/dat-folder-db.git"},"author":{"name":"Joe Hand","email":"joe@hand.email","url":"https://joeahand.com/"},"license":"MIT","bugs":{"url":"https://github.com/joehand/dat-folder-db/issues"},"homepage":"https://github.com/joehand/dat-folder-db#readme","dependencies":{"dat-encoding":"^3.0.1","level":"^1.5.0"},"devDependencies":{"hyperdrive":"^7.6.0","rimraf":"^2.5.4","standard":"^8.5.0","tap-spec":"^4.1.1","tape":"^4.6.2"},"gitHead":"c3442aa1db1a51b53e7b4201b9f41b33853de647","_id":"dat-folder-db@2.1.3","_shasum":"4ce4b6e31c836f25b58602603d146b588b7ad90d","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"jhand","email":"joe@hand.email"},"dist":{"shasum":"4ce4b6e31c836f25b58602603d146b588b7ad90d","tarball":"https://registry.npmjs.org/dat-folder-db/-/dat-folder-db-2.1.3.tgz","integrity":"sha512-TMesLnvE2hgB35DivlAn7GunYOJ6C6fZE/zHzM9SXbU2BHX2+recrgj3Tx6UbupWGP8rHWTZoN9Uz5cNKXxr9Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDXcl1QrmNlZRmTwag7F12/CHe8PKl9pIvObYaq/LJ+dAiAr4PDuoyiy4VoxQH9bUoJ3AHnqUS/NUWFyn8IoZkWVwA=="}]},"maintainers":[{"name":"jhand","email":"joe@hand.email"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/dat-folder-db-2.1.3.tgz_1480633057238_0.941327138338238"}}},"readme":"# dat-folder-db [![Travis](https://img.shields.io/travis/joehand/dat-folder-db.svg?style=flat-square)](https://travis-ci.org/joehand/dat-folder-db) [![npm](https://img.shields.io/npm/v/dat-folder-db.svg?style=flat-square)](https://npmjs.org/package/dat-folder-db)\n\nMake Dat CLI compatible databases. A database made with `dat-folder-db` can be resumed with the Dat CLI.\n\nWrapper of level to create/resume a `.dat` folder database. If there is an existing `.dat` folder, it will get the key of the existing dat, allowing it to be resumed.\n\nUse in Dat applications using node and the file system to store the database.\n\n## Usage\n\n```js\nvar datDb = require('dat-folder-db')\ndatDb(dir, function (err, db, existingKey, putKey) {\n  if (err) throw err\n  var resume = !!existingKey // resume the dat if a key exists\n\n  // use db with hyperdrive\n  var drive = hyperdrive(db)\n  var archive = drive.createArchive(existingKey)\n\n  if (!resume) putkey(archive.key, function () {\n    // key in db. can resume now\n  })\n})\n```\n\nThis will create a `.dat` folder: `my_folder/.dat` and a `level` database in that folder.\n\nSee `example.js` for a full example.\n\n## API\n\n### `datFolder(dir, [opts], cb)`\n\nCreates a level db in the `.dat` folder and checks if there is an existing key saved there.\n\n* `dir` is required. This is the base path for the dat folder. \n* `cb` is called with `(err, db, existingKey, saveKey)`\n  * `db` is the level database in `dir/.dat`\n  * `existingKey` is the key found in the database or null if nothing is found.\n  * `saveKey` is a function to save the key back to the database.\n\n`opts` include:\n\n```js\nopts = {\n  dbName : '.dat' // use a different name for the database\n}\n```\n\n## License \n\nMIT\n","maintainers":[{"name":"jhand","email":"joe@hand.email"}],"time":{"modified":"2022-06-14T18:48:27.390Z","created":"2016-10-13T17:23:18.622Z","1.0.0":"2016-10-13T17:23:18.622Z","2.0.0":"2016-11-17T20:59:39.484Z","2.1.0":"2016-11-18T18:19:07.079Z","2.1.1":"2016-11-30T00:15:00.791Z","2.1.2":"2016-11-30T16:35:29.852Z","2.1.3":"2016-12-01T22:57:37.458Z"},"homepage":"https://github.com/joehand/dat-folder-db#readme","repository":{"type":"git","url":"git+https://github.com/joehand/dat-folder-db.git"},"author":{"name":"Joe Hand","email":"joe@hand.email","url":"https://joeahand.com/"},"bugs":{"url":"https://github.com/joehand/dat-folder-db/issues"},"license":"MIT","readmeFilename":"readme.md"}