Permalink
Browse files

node packaged manuscript

  • Loading branch information...
1 parent 0b9052c commit d6917d08754c0ae0b340887817bb6c3692aef91c @substack committed Jun 2, 2014
Showing with 57 additions and 20 deletions.
  1. +6 −0 bin/cmd.js
  2. +29 −0 package.json
  3. +22 −20 readme.markdown
View
@@ -0,0 +1,6 @@
+#!/usr/bin/env node
+
+var fs = require('fs');
+var pager = require('default-pager');
+
+fs.createReadStream(__dirname + '/../readme.markdown').pipe(pager());
View
@@ -0,0 +1,29 @@
+{
+ "name": "stream-handbook",
+ "version": "1.0.0",
+ "description": "how to write node programs with streams",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/substack/browserify-handbook.git"
+ },
+ "homepage": "https://github.com/substack/browserify-handbook",
+ "keywords": [
+ "documentation",
+ "guide",
+ "handbook",
+ "stream",
+ "streams"
+ ],
+ "author": {
+ "name": "James Halliday",
+ "email": "mail@substack.net",
+ "url": "http://substack.net"
+ },
+ "license": "cc-by-3.0",
+ "dependencies": {
+ "default-pager": "^1.0.1"
+ },
+ "bin": {
+ "stream-handbook": "bin/cmd.js"
+ }
+}
View
@@ -482,6 +482,28 @@ in the incoming buffer.
If you want to wait for the buffer to empty again, listen for a `'drain'` event.
+## transform
+
+Transform streams are
@h0ke

h0ke Jun 8, 2014

@substack Looks like the beginning of something useful here. 😄

+
+You might also hear transform streams referred to as "through streams".
+
+Through streams are simple readable/writable filters that transform input and
+produce output.
+
+## duplex
+
+Duplex streams are readable/writable and both ends of the stream engage
+in a two-way interaction, sending back and forth messages like a telephone. An
+rpc exchange is a good example of a duplex stream. Any time you see something
+like:
+
+``` js
+a.pipe(b).pipe(a)
+```
+
+you're probably dealing with a duplex stream.
+
## classic streams
Classic streams are the old interface that first appeared in node 0.4.
@@ -603,26 +625,6 @@ and `.destroy()`.
to mean `stream.write(buf); stream.end()` and you shouldn't violate their
expectations.
-## transform
-
-You might also hear transform streams referred to as "through streams".
-
-Through streams are simple readable/writable filters that transform input and
-produce output.
-
-## duplex
-
-Duplex streams are readable/writable and both ends of the stream engage
-in a two-way interaction, sending back and forth messages like a telephone. An
-rpc exchange is a good example of a duplex stream. Any time you see something
-like:
-
-``` js
-a.pipe(b).pipe(a)
-```
-
-you're probably dealing with a duplex stream.
-
## read more
* [core stream documentation](http://nodejs.org/docs/latest/api/stream.html#stream_stream)

0 comments on commit d6917d0

Please sign in to comment.