Skip to content

Commit

Permalink
Add missing API docs
Browse files Browse the repository at this point in the history
  • Loading branch information
robertrossmann committed Jul 16, 2016
1 parent a6ffd9c commit df04db9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/nodestream.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ class Nodestream {
}
}

/**
* Create a new pipeline from this Nodestream instance
*
* @return {Pipeline}
*/
pipeline() {
return new Pipeline({
adapter: this[scope].adapter,
Expand Down
11 changes: 11 additions & 0 deletions lib/pipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ const Domain = require('domain').Domain
const uuid = require('uuid')
const scope = Symbol('nodestream internal')

/**
* Pipeline - a set of ordered transforms
*/
class Pipeline {

constructor(options) {
Expand All @@ -30,6 +33,14 @@ class Pipeline {
}
}

/**
* Use the given transform plugin in this pipeline
*
* @param {String} transform The transform's `identity`
* @param {Object?} options Options to be passed to the transform when a file is about
* to be processed
* @return {this}
*/
use(transform, options) {
const transformer = this[scope].transforms.get(transform)

Expand Down

0 comments on commit df04db9

Please sign in to comment.