https://github.com/doowb/vinyl-dat
Vinyl adapter for dat
https://github.com/doowb/vinyl-dat
Last synced: over 1 year ago
JSON representation
Vinyl adapter for dat
- Host: GitHub
- URL: https://github.com/doowb/vinyl-dat
- Owner: doowb
- License: mit
- Created: 2014-08-27T03:01:06.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2015-10-16T03:09:11.000Z (almost 11 years ago)
- Last Synced: 2025-03-27T20:40:40.983Z (over 1 year ago)
- Language: JavaScript
- Size: 145 KB
- Stars: 11
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-MIT
Awesome Lists containing this project
README
# vinyl-dat [](http://badge.fury.io/js/vinyl-dat)
> Vinyl adapter for dat
## Install
Install with [npm](npmjs.org):
```bash
npm i vinyl-dat --save-dev
```
## Usage
```js
var dat = require('dat');
var vdat = require('vinyl-dat');
var debug = require('gulp-debug');
// new gulp task with callback
gulp.task('demo', function (cb) {
// new dat database instance
var db = dat('path/to/dat/database', function (err) {
if (err) return cb(err);
// new stream from dat
var stream = vdat.src(db)
// show each record
.pipe(debug())
// write changed records to same database
.pipe(vdat.dest(db));
// use stream on end to close the database when finished
stream.on('end', function () {
db.close(cb);
});
});
});
```
## API
## Author
**Brian Woodward**
+ [github/doowb](https://github.com/doowb)
+ [twitter/doowb](http://twitter.com/doowb)
## License
Copyright (c) 2014 Brian Woodward, contributors.
Released under the MIT license
***
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on August 27, 2014._