0.2.0 • Published 10 years ago

data-streams v0.2.0

Weekly downloads
9
License
MIT
Repository
github
Last release
10 years ago

data-streams

Transforms the Dataset resources of a package.jsonld into streams.

NPM

Usage

var Pkg = require('data-streams');
var myPackage = require('package.jsonld');

var pkg = new Pkg(myPackage, '.');
var stream = pkg.createReadStream(name, options);

name is the name of the Dataset resource.

For the resources in csv and ldjson format, an options object with the following properties can be specified:

  • objectMode: (true/false) return a stream in objectMode where every chunk will be a row (as a JS object).
  • coerce: (true/false) coerce the values according to the types specified in schema (implies objectMode)
  • ldjsonify: (true/false) JSON.stringify + '\n' (implies objectMode)
  • filter: an array of column to be kept (all the other will be filtered out)

Tests

npm test

Licence

MIT

0.2.0

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago

0.0.0

10 years ago