Permalink
Browse files

readme notes about into() and a bump

  • Loading branch information...
1 parent 3faf8f9 commit 503eb8be3a272f44986bc5caee83671275328f32 @substack committed Apr 28, 2011
Showing with 14 additions and 2 deletions.
  1. +10 −0 README.markdown
  2. +4 −2 package.json
View
@@ -13,6 +13,7 @@ Examples
parse.js
--------
+
var buf = new Buffer([ 97, 98, 99, 100, 101, 102, 0 ]);
var Binary = require('binary');
@@ -112,6 +113,7 @@ stash at at `key`, excluding the search buffer. If `buffer` passed as a string,
it will be converted into a Buffer internally.
For example, to read in a line you can just do:
+
Binary(em)
.scan('line', new Buffer('\r\n'))
.tap(function (vars) {
@@ -125,6 +127,14 @@ tap(cb)
The callback `cb` is provided with the variable stash from all the previous
actions once they've all finished.
+You can nest additional actions onto `this` inside the callback.
+
+into(key, cb)
+-------------
+
+Like `.tap()`, except all nested actions will assign into a `key` in the `vars`
+stash.
+
loop(cb)
--------
View
@@ -1,6 +1,6 @@
{
"name" : "binary",
- "version" : "0.1.9",
+ "version" : "0.2.0",
"description" : "Unpack multibyte binary values from buffers",
"main" : "./index.js",
"repository" : {
@@ -33,5 +33,7 @@
"test" : "expresso"
},
"license" : "MIT/X11",
- "engine" : ["node >=0.2.0"]
+ "engine" : {
+ "node" : ">=0.2.0"
+ }
}

0 comments on commit 503eb8b

Please sign in to comment.