bufferstreams
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "bufferstreams", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Abstract streams to deal with the whole buffered contents.", | ||
@@ -8,3 +8,6 @@ "homepage": "https://github.com/nfroidure/BufferStreams", | ||
"scripts": { | ||
"test": "mocha tests/*.mocha.js" | ||
"test": "./node_modules/mocha/bin/mocha tests/*.mocha.js", | ||
"coveralls": "./node_modules/istanbul/lib/cli.js cover ./node_modules/mocha/bin/_mocha --report lcovonly -- tests/*.mocha.js -R spec -t 5000 && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage", | ||
"cover": "./node_modules/istanbul/lib/cli.js cover --report html ./node_modules/mocha/bin/_mocha -- tests/*.mocha.js -R spec -t 5000", | ||
"trinity": "npm-check-updates -u && npm test && git commit package.json -m \"Dependencies update\" && git push" | ||
}, | ||
@@ -22,6 +25,9 @@ "repository": { | ||
], | ||
"devDependencies": { | ||
"mocha": "1.x.x", | ||
"event-stream": "1.x.x" | ||
}, | ||
"devDependencies": { | ||
"mocha": "1.x.x", | ||
"event-stream": "3.x.x", | ||
"mocha-lcov-reporter": "0.0.1", | ||
"coveralls": "~2.8.0", | ||
"istanbul": "~0.2.6" | ||
}, | ||
"author": { | ||
@@ -42,3 +48,6 @@ "name": "Nicolas Froidure", | ||
"url": "https://github.com/nfroidure/BufferStreams/issues" | ||
}, | ||
"dependencies": { | ||
"readable-stream": "^1.0.26-2" | ||
} | ||
} |
@@ -1,4 +0,6 @@ | ||
# BufferStreams [![NPM version](https://badge.fury.io/js/bufferstreams.png)](https://npmjs.org/package/bufferstreams) [![Build Status](https://travis-ci.org/nfroidure/BufferStreams.png?branch=master)](https://travis-ci.org/nfroidure/BufferStreams) | ||
# BufferStreams | ||
BufferStreams abstracts streams to allow you to deal with the whole contents in | ||
[![NPM version](https://badge.fury.io/js/bufferstreams.png)](https://npmjs.org/package/bufferstreams) [![Build Status](https://travis-ci.org/nfroidure/BufferStreams.png?branch=master)](https://travis-ci.org/nfroidure/BufferStreams) [![Dependency Status](https://david-dm.org/nfroidure/bufferstreams.png)](https://david-dm.org/nfroidure/bufferstreams) [![devDependency Status](https://david-dm.org/nfroidure/bufferstreams/dev-status.png)](https://david-dm.org/nfroidure/bufferstreams#info=devDependencies) [![Coverage Status](https://coveralls.io/repos/nfroidure/BufferStreams/badge.png?branch=master)](https://coveralls.io/r/nfroidure/BufferStreams?branch=master) | ||
BufferStreams abstracts streams to allow you to deal with their whole content in | ||
a single buffer when it becomes necessary (by example: a legacy library that | ||
@@ -29,6 +31,6 @@ do not support streams). | ||
// buf will contain the whole piped in stream contents | ||
buf = Buffer(buf.toString(utf-8).repalce('foo', 'bar')); | ||
buf = Buffer(buf.toString('utf-8').replace('foo', 'bar')); | ||
// cb is a callback to pass the result back to the piped out stream | ||
// first argument is an error that wil be emitted if one | ||
// first argument is an error that will be emitted if any | ||
// the second argument is the modified buffer | ||
@@ -35,0 +37,0 @@ cb(null, buf); |
@@ -1,2 +0,2 @@ | ||
var PassThrough = require('stream').PassThrough; | ||
var PassThrough = require('readable-stream').PassThrough; | ||
var util = require('util'); | ||
@@ -12,3 +12,3 @@ | ||
if (!(this instanceof BufferStream)) { | ||
throw Error('Please use the "new" operator to instanciate a BufferStream.'); | ||
return new BufferStream(cb); | ||
} | ||
@@ -15,0 +15,0 @@ |
@@ -88,3 +88,3 @@ var assert = require('assert') | ||
es.readArray(['te', 'st']) | ||
.pipe(new BufferStream(function(err, buf, cb){ | ||
.pipe(BufferStream(function(err, buf, cb){ | ||
cb(null, null); | ||
@@ -91,0 +91,0 @@ })) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8687
45
1
5
+ Addedreadable-stream@^1.0.26-2
+ Addedcore-util-is@1.0.3(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedisarray@0.0.1(transitive)
+ Addedreadable-stream@1.1.14(transitive)
+ Addedstring_decoder@0.10.31(transitive)