Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

rebranded as binary

  • Loading branch information...
commit 11b5c602b08a96cf115ef3712c3f2591aef54168 1 parent ab70b3b
@substack authored
View
6 README.markdown
@@ -1,5 +1,5 @@
-Take
-====
+Binary
+======
Unpack multibyte binary values from buffers and streams.
You can specify the endianness and signedness of the fields to be unpacked too.
@@ -9,7 +9,7 @@ Installation
To install with [npm](http://github.com/isaacs/npm):
- npm install take
+ npm install binary
To run the tests with [expresso](http://github.com/visionmedia/expresso):
View
2  index.js
@@ -1,7 +1,7 @@
var Chainsaw = require('chainsaw');
var EventEmitter = require('events').EventEmitter;
-module.exports = function Take (bufOrEm) {
+module.exports = function (bufOrEm) {
var active = { buf : null, offset : 0, cb : null };
var rem = { buf : null, offset : 0 };
View
4 package.json
@@ -1,5 +1,5 @@
{
- "name" : "take",
+ "name" : "binary",
"version" : "0.0.1",
"description" : "Unpack multibyte binary values from buffers",
"modules" : {
@@ -7,7 +7,7 @@
},
"repository" : {
"type" : "git",
- "url" : "http://github.com/substack/node-take.git"
+ "url" : "http://github.com/substack/node-binary.git"
},
"keywords": [
"binary",
View
10 test/take.js → test/binary.js
@@ -1,4 +1,4 @@
-var Take = require('take');
+var Binary = require('binary');
var EventEmitter = require('events').EventEmitter;
exports.buffer = function (assert) {
@@ -6,7 +6,7 @@ exports.buffer = function (assert) {
assert.fail('never tapped');
}, 50);
- Take(new Buffer([ 97, 98, 99 ]))
+ Binary(new Buffer([ 97, 98, 99 ]))
.word8('a')
.word16be('bc')
.tap(function (vars) {
@@ -22,7 +22,7 @@ exports.immediate = function (assert) {
}, 50);
var em = new EventEmitter;
- Take(em)
+ Binary(em)
.word8('a')
.word16be('bc')
.tap(function (vars) {
@@ -40,7 +40,7 @@ exports.deferred = function (assert) {
}, 50);
var em = new EventEmitter;
- Take(em)
+ Binary(em)
.word8('a')
.word16be('bc')
.tap(function (vars) {
@@ -60,7 +60,7 @@ exports.split = function (assert) {
}, 50);
var em = new EventEmitter;
- Take(em)
+ Binary(em)
.word8('a')
.word16be('bc')
.tap(function (vars) {
Please sign in to comment.
Something went wrong with that request. Please try again.