Skip to content

Commit

Permalink
docs for objCtor
Browse files Browse the repository at this point in the history
  • Loading branch information
brycebaril committed Jun 10, 2014
1 parent cf251b1 commit f1ad405
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,26 @@ var spaceout = through2(function (chunk, encoding, callback) {
API
---

`require("through2-map")(options, fn)`
`require("through2-map")([options,] fn)`
---

Create a `stream.Transform` instance that will call `fn(chunk, index)` on each stream segment.

`var Tx = require("through2-map").ctor(options, fn)`
`var Tx = require("through2-map").ctor([options,] fn)`
---

Create a reusable `stream.Transform` TYPE that can be called via `new Tx` or `Tx()` to create an instance.

`require("through2-map").obj(options, fn)`
`require("through2-map").obj([options,] fn)`
---

Create a `through2-map` instance that defaults to `objectMode: true`.

`require("through2-map").objCtor([options,] fn)`
---

Just like ctor, but with `objectMode: true` defaulting to true.

Options
-------

Expand Down

0 comments on commit f1ad405

Please sign in to comment.