bl 0.9.5 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.travis.yml +5 -2
- package/README.md +2 -0
- package/bl.js +0 -5
- package/package.json +5 -4
- package/test/basic-test.js +0 -16
package/.travis.yml
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
language: node_js
|
|
2
|
+
before_install:
|
|
3
|
+
- curl --location http://git.io/1OcIZA | bash -s
|
|
2
4
|
node_js:
|
|
3
5
|
- 0.8
|
|
4
|
-
-
|
|
6
|
+
- 0.10
|
|
7
|
+
- 0.11
|
|
5
8
|
branches:
|
|
6
9
|
only:
|
|
7
10
|
- master
|
|
8
11
|
notifications:
|
|
9
12
|
email:
|
|
10
13
|
- rod@vagg.org
|
|
11
|
-
script: npm test
|
|
14
|
+
script: npm test
|
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# bl *(BufferList)*
|
|
2
2
|
|
|
3
|
+
[](https://travis-ci.org/rvagg/bl)
|
|
4
|
+
|
|
3
5
|
**A Node.js Buffer list collector, reader and streamer thingy.**
|
|
4
6
|
|
|
5
7
|
[](https://nodei.co/npm/bl/)
|
package/bl.js
CHANGED
|
@@ -52,11 +52,6 @@ BufferList.prototype.append = function (buf) {
|
|
|
52
52
|
var isBuffer = Buffer.isBuffer(buf) ||
|
|
53
53
|
buf instanceof BufferList
|
|
54
54
|
|
|
55
|
-
// coerce number arguments to strings, since Buffer(number) does
|
|
56
|
-
// uninitialized memory allocation
|
|
57
|
-
if (typeof buf == 'number')
|
|
58
|
-
buf = buf.toString()
|
|
59
|
-
|
|
60
55
|
this._bufs.push(isBuffer ? buf : new Buffer(buf))
|
|
61
56
|
this.length += buf.length
|
|
62
57
|
return this
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bl",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Buffer List: collect buffers and access with a standard readable Buffer interface, streamable too!",
|
|
5
5
|
"main": "bl.js",
|
|
6
6
|
"scripts": {
|
|
@@ -25,11 +25,12 @@
|
|
|
25
25
|
],
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"readable-stream": "~
|
|
28
|
+
"readable-stream": "~2.0.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"
|
|
31
|
+
"tape": "~2.12.3",
|
|
32
32
|
"hash_file": "~0.1.1",
|
|
33
|
-
"
|
|
33
|
+
"faucet": "~0.0.1",
|
|
34
|
+
"brtapsauce": "~0.3.0"
|
|
34
35
|
}
|
|
35
36
|
}
|
package/test/basic-test.js
CHANGED
|
@@ -336,22 +336,6 @@ tape('test String appendage', function (t) {
|
|
|
336
336
|
t.end()
|
|
337
337
|
})
|
|
338
338
|
|
|
339
|
-
tape('test Number appendage', function (t) {
|
|
340
|
-
var bl = new BufferList()
|
|
341
|
-
, b = new Buffer('1234567890')
|
|
342
|
-
|
|
343
|
-
bl.append(1234)
|
|
344
|
-
bl.append(567)
|
|
345
|
-
bl.append(89)
|
|
346
|
-
bl.append(0)
|
|
347
|
-
|
|
348
|
-
encodings.forEach(function (enc) {
|
|
349
|
-
t.equal(bl.toString(enc), b.toString(enc))
|
|
350
|
-
})
|
|
351
|
-
|
|
352
|
-
t.end()
|
|
353
|
-
})
|
|
354
|
-
|
|
355
339
|
tape('write nothing, should get empty buffer', function (t) {
|
|
356
340
|
t.plan(3)
|
|
357
341
|
BufferList(function (err, data) {
|