An open API service indexing awesome lists of open source software.

https://github.com/doowb/vinyl-dat

Vinyl adapter for dat
https://github.com/doowb/vinyl-dat

Last synced: about 2 months ago
JSON representation

Vinyl adapter for dat

Awesome Lists containing this project

README

        

# vinyl-dat [![NPM version](https://badge.fury.io/js/vinyl-dat.svg)](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._