Simulator first commit
This commit is contained in:
61
node_modules/drop-stream/README.md
generated
vendored
Normal file
61
node_modules/drop-stream/README.md
generated
vendored
Normal file
@ -0,0 +1,61 @@
|
||||
# drop-stream [](https://gemnasium.com/schnittstabil/drop-stream) [](https://travis-ci.org/schnittstabil/drop-stream) [](https://coveralls.io/r/schnittstabil/drop-stream)
|
||||
|
||||
A Duplex stream which discards all chunks passed through.
|
||||
|
||||
## Usage
|
||||
|
||||
Install using:
|
||||
|
||||
```bash
|
||||
npm install drop-stream --save
|
||||
```
|
||||
|
||||
Then pipe through a drop instance:
|
||||
|
||||
```Javascript
|
||||
var DropStream = require('drop-stream'),
|
||||
PassThrough = require('stream').PassThrough,
|
||||
opts = {objectMode: true},
|
||||
pre = new PassThrough(opts),
|
||||
drop = DropStream.obj(),
|
||||
post = new PassThrough(opts),
|
||||
count = 0;
|
||||
|
||||
post.on('data', function() {
|
||||
count++;
|
||||
});
|
||||
|
||||
post.on('finish', function() {
|
||||
assert.strictEqual(count, 0, count + ' chunks detected'); // won't throw
|
||||
});
|
||||
|
||||
pre.pipe(drop).pipe(post);
|
||||
|
||||
pre.write('foo');
|
||||
pre.write(1);
|
||||
pre.write({ foobar: 'foobar', answer: 42 });
|
||||
pre.write('bar');
|
||||
pre.end();
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### Class: DropStream
|
||||
|
||||
Drop streams are [Transform](http://nodejs.org/api/stream.html#stream_class_stream_transform) streams.
|
||||
|
||||
#### new DropStream([options])
|
||||
|
||||
* _options_ `Object` passed through [new stream.Transform([options])](http://nodejs.org/api/stream.html#stream_new_stream_transform_options)
|
||||
|
||||
Note: The `new` operator can be omitted
|
||||
|
||||
#### DropStream#obj([options])
|
||||
|
||||
A convenience wrapper for `new DropStream({objectMode: true, ...})`.
|
||||
|
||||
## License
|
||||
|
||||
Copyright (c) 2014 Michael Mayer
|
||||
|
||||
Licensed under the MIT license.
|
23
node_modules/drop-stream/index.js
generated
vendored
Normal file
23
node_modules/drop-stream/index.js
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
'use strict';
|
||||
var Transform = require('readable-stream/transform'),
|
||||
inherits = require('util').inherits;
|
||||
|
||||
function DropStream(options) {
|
||||
if (!(this instanceof DropStream)) {
|
||||
return new DropStream(options);
|
||||
}
|
||||
Transform.call(this, options);
|
||||
}
|
||||
inherits(DropStream, Transform);
|
||||
|
||||
DropStream.prototype._transform = function(chunk, encoding, done) {
|
||||
done();
|
||||
};
|
||||
|
||||
DropStream.obj = function (options) {
|
||||
options = options || {};
|
||||
options.objectMode = true;
|
||||
return new DropStream(options);
|
||||
};
|
||||
|
||||
module.exports = DropStream;
|
83
node_modules/drop-stream/package.json
generated
vendored
Normal file
83
node_modules/drop-stream/package.json
generated
vendored
Normal file
@ -0,0 +1,83 @@
|
||||
{
|
||||
"_from": "drop-stream@^0.1.1",
|
||||
"_id": "drop-stream@0.1.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-SDeBV7wRW3sa3eStPOQzdCOW5Lc=",
|
||||
"_location": "/drop-stream",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "drop-stream@^0.1.1",
|
||||
"name": "drop-stream",
|
||||
"escapedName": "drop-stream",
|
||||
"rawSpec": "^0.1.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^0.1.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/mumble-client"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/drop-stream/-/drop-stream-0.1.1.tgz",
|
||||
"_shasum": "48378157bc115b7b1adde4ad3ce433742396e4b7",
|
||||
"_spec": "drop-stream@^0.1.1",
|
||||
"_where": "/home/sergiu/linx-audio-simulator/node_modules/mumble-client",
|
||||
"author": {
|
||||
"name": "Michael Mayer",
|
||||
"email": "michael@schnittstabil.de",
|
||||
"url": "https://github.com/schnittstabil"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/schnittstabil/drop-stream/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"readable-stream": "^1.0.27-1"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "A Duplex stream which discards all chunks passed through",
|
||||
"devDependencies": {
|
||||
"coveralls": "^2.11.0",
|
||||
"gulp": "^3.8.5",
|
||||
"gulp-istanbul": "^0.2.0",
|
||||
"gulp-jscs": "^0.6.0",
|
||||
"gulp-jshint": "^1.6.4",
|
||||
"gulp-mocha": "^0.4.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^0.11 || ^0.10"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/schnittstabil/drop-stream",
|
||||
"keywords": [
|
||||
"passthrough",
|
||||
"stream",
|
||||
"drop",
|
||||
"clean",
|
||||
"discard",
|
||||
"duplex",
|
||||
"gulpfriendly"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "drop-stream",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/schnittstabil/drop-stream.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "./node_modules/gulp/bin/gulp.js && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"
|
||||
},
|
||||
"version": "0.1.1",
|
||||
"warnings": [
|
||||
{
|
||||
"code": "ENOTSUP",
|
||||
"required": {
|
||||
"node": "^0.11 || ^0.10"
|
||||
},
|
||||
"pkgid": "drop-stream@0.1.1"
|
||||
}
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user