{
	"name": "@samverschueren/stream-to-observable",
	"versions": {
		"0.3.0": {
			"name": "@samverschueren/stream-to-observable",
			"version": "0.3.0",
			"description": "Convert Node Streams into ECMAScript-Observables",
			"license": "MIT",
			"repository": {
				"type": "git",
				"url": "git+https://github.com/SamVerschueren/stream-to-observable.git"
			},
			"maintainers": [
				{
					"name": "samverschueren",
					"email": "sam.verschueren@gmail.com"
				}
			],
			"engines": {
				"node": ">=6"
			},
			"scripts": {
				"test": "xo && nyc --reporter=lcov --reporter=text npm run test_both",
				"test_both": "ava --require=any-observable/register/rxjs && ava --require=any-observable/register/zen"
			},
			"files": [
				"index.js"
			],
			"keywords": [
				"stream",
				"observable",
				"convert"
			],
			"dependencies": {
				"any-observable": "^0.3.0"
			},
			"devDependencies": {
				"array-to-events": "^1.0.0",
				"ava": "^0.25.0",
				"coveralls": "^3.0.0",
				"delay": "^2.0.0",
				"nyc": "^11.7.1",
				"rxjs": "^5.5.10",
				"xo": "^0.20.3",
				"zen-observable": "^0.8.8"
			},
			"gitHead": "3560a9f394627fc64c21913f0b3cbbf7a79ff271",
			"bugs": {
				"url": "https://github.com/SamVerschueren/stream-to-observable/issues"
			},
			"homepage": "https://github.com/SamVerschueren/stream-to-observable#readme",
			"_id": "@samverschueren/stream-to-observable@0.3.0",
			"_npmVersion": "5.6.0",
			"_nodeVersion": "8.9.4",
			"_npmUser": {
				"name": "samverschueren",
				"email": "sam.verschueren@gmail.com"
			},
			"dist": {
				"integrity": "sha512-MI4Xx6LHs4Webyvi6EbspgyAb4D2Q2VtnCQ1blOJcoLS6mVa8lNN2rkIy1CVxfTUpoyIbCTkXES1rLXztFD1lg==",
				"shasum": "ecdf48d532c58ea477acfcab80348424f8d0662f",
				"tarball": "https://registry.npmjs.org/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.0.tgz",
				"fileCount": 4,
				"unpackedSize": 9610,
				"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa8x2hCRA9TVsSAnZWagAA/7oP/1Kro6xt7Bco+5+LTsdr\nTzi0fC0mm9RvOqy486cB8kTv+Jvfj53Fq6jwT6fNpMnYXYxkdsDC5B45g4Bh\nHtMLcKmCw8v1xWK35A3BxYgp79H1FrCGgmasdi68HryPhA2vB/HyLyeM9QJu\nE3B/hcNP6e9KrtMxe397KoaPYW/W8i+Qqa6EGqiizRtL3h1powoNJGBoOxc9\nInb6zMk0b2FUPCeeA6uYSbHRHyYNUCU5mTuiM3MTfTHRxnMfnNpvURqKG5cG\nij8eV1qS3c8UHmZ1DrpEk60JBLOlRLN7Xux5tyzUrS6wMryPszoUXFEshG8+\n7xw8OkPj9SDbVorNKuH9KZqOWmannO2pfEZCDwBviFFvveKddVyVQLsO65RB\n3itb5SkbvzAvU1Wvm5yXOUiZzmEw97dcelUmfYBLx5tVjk4YtT+Ft0ia/EkE\nzd3BmFY3i8A9sJXj/4ySfZ427pwimz4yjN8X2MmemdqHqRvGHVr6PitoHR7o\npE/x6CAXyaQxfGtvHhKSe9KDQuVKvL3B53CooA4HJ0rfOk+t8RfgasP54/l8\nesyakna9skfCLlLMoNbq6b+BikhgQcigbZhtxlDQmxqxAsedylcqPpwnUKXX\n+EDlY4DvPDZ3yIzfDMEueRNM1XkiiZ7hqgvgq8qQLyb8eu7U/oNRnMzLP8AA\nX+6A\r\n=Cnzp\r\n-----END PGP SIGNATURE-----\r\n"
			},
			"directories": {},
			"_npmOperationalInternal": {
				"host": "s3://npm-registry-packages",
				"tmp": "tmp/stream-to-observable_0.3.0_1525882272635_0.11282631282914335"
			},
			"contributors": []
		}
	},
	"time": {
		"created": "2018-05-09T16:11:12.571Z",
		"0.3.0": "2018-05-09T16:11:12.705Z",
		"modified": "2018-05-09T16:11:15.900Z"
	},
	"users": {},
	"dist-tags": {
		"latest": "0.3.0"
	},
	"_uplinks": {
		"npmjs": {
			"etag": "W/\"ef86eb9e405f12b27780249de1b805d3\"",
			"fetched": 1593324467105
		}
	},
	"_distfiles": {
		"stream-to-observable-0.3.0.tgz": {
			"url": "https://registry.npmjs.org/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.0.tgz",
			"sha": "ecdf48d532c58ea477acfcab80348424f8d0662f",
			"registry": "npmjs"
		}
	},
	"_attachments": {
		"stream-to-observable-0.3.0.tgz": {
			"shasum": "ecdf48d532c58ea477acfcab80348424f8d0662f"
		}
	},
	"_rev": "2-390028d361178ff5",
	"_id": "@samverschueren/stream-to-observable",
	"readme": "# stream-to-observable [![Build Status](https://travis-ci.org/SamVerschueren/stream-to-observable.svg?branch=master)](https://travis-ci.org/SamVerschueren/stream-to-observable) [![Coverage Status](https://coveralls.io/repos/github/SamVerschueren/stream-to-observable/badge.svg?branch=master)](https://coveralls.io/github/SamVerschueren/stream-to-observable?branch=master)\n\n> Convert Node Streams into ECMAScript-Observables\n\n[`Observables`](https://github.com/zenparsing/es-observable) are rapidly gaining popularity. They have much in common with Streams, in that they both represent data that arrives over time. Most Observable implementations provide expressive methods for filtering and mutating incoming data. Methods like `.map()`, `.filter()`, and `.forEach` behave very similarly to their Array counterparts, so using Observables can be very intuitive.\n\n[Learn more about Observables](#learn-about-observables)\n\n**Note:** This module was forked from [`stream-to-observable`](https://github.com/jamestalmage/stream-to-observable) and released under a different name due to inactivity.\n\n## Install\n\n```\n$ npm install --save @samverschueren/stream-to-observable\n```\n\n`stream-to-observable` relies on [`any-observable`](https://github.com/sindresorhus/any-observable), which will search for an available Observable implementation. You need to install one yourself:\n\n  ```\n  $ npm install --save zen-observable\n  ```\n\n  or\n\n  ```\n  $ npm install --save rxjs\n  ```\n\nIf your code relies on a specific Observable implementation, you should likely specify one using `any-observable`s [registration shortcuts](https://github.com/sindresorhus/any-observable#registration-shortcuts).\n\n## Usage\n\n```js\nconst fs = require('fs');\nconst split = require('split');\n\nconst streamToObservable = require('@samverschueren/stream-to-observable');\n\nconst readStream = fs\n  .createReadStream('./hello-world.txt', {encoding: 'utf8'})\n  .pipe(split());\n\nstreamToObservable(readStream)\n  .filter(chunk => /hello/i.test(chunk))\n  .map(chunk => chunk.toUpperCase())\n  .forEach(chunk => {\n    console.log(chunk); // only the lines containing \"hello\" - and they will be capitalized\n  });\n```\n\nThe [`split`](https://github.com/dominictarr/split) module above will chunk the stream into individual lines. This is often very handy for text streams, as each observable event is guaranteed to be a line.\n\n## API\n\n### streamToObservable(stream, [options])\n\n#### stream\n\nType: [`ReadableStream`](https://nodejs.org/api/stream.html#stream_class_stream_readable)\n\n*Note:*\n`stream` can technically be any [`EventEmitter`](https://nodejs.org/api/events.html#events_class_eventemitter) instance. By default, this module listens to the standard Stream events (`data`, `error`, and `end`), but those are configurable via the `options` parameter. If you are using this with a standard Stream, you likely won't need the `options` parameter.\n\n#### options\n\n##### await\n\nType: `Promise`\n\nIf provided, the Observable will not \"complete\" until `await` is resolved. If `await` is rejected, the Observable will immediately emit an `error` event and disconnect from the stream. This is mostly useful when attaching to the `stdin` or `stdout` streams of a  [`child_process`](https://nodejs.org/api/child_process.html#child_process_child_stdio). Those streams usually do not emit `error` events, even if the underlying process exits with an error. This provides a means to reject the Observable if the child process exits with an unexpected error code.\n\n##### endEvent\n\nType: `String` or `false` <br>\nDefault: `\"end\"`\n\nIf you are using an `EventEmitter` or non-standard Stream, you can change which event signals that the Observable should be completed.\n\nSetting this to `false` will avoid listening for any end events.\n\nSetting this to `false` and providing an `await` Promise will cause the Observable to resolve immediately with the `await` Promise (the Observable will remove all it's `data` event listeners from the stream once the Promise is resolved).\n\n##### errorEvent\n\nType: `String` or `false` <br>\nDefault: `\"error\"`\n\nIf you are using an `EventEmitter` or non-standard Stream, you can change which event signals that the Observable should be closed with an error.\n\nSetting this to `false` will avoid listening for any error events.\n\n##### dataEvent\n\nType: `String`<br>\nDefault: `\"data\"`\n\nIf you are using an `EventEmitter` or non-standard Stream, you can change which event causes data to be emitted to the Observable.\n\n## Learn about Observables\n\n - [Overview](https://github.com/zenparsing/es-observable)\n - [Formal Spec](https://github.com/tc39/proposal-observable/)\n - [egghead.io lesson](https://egghead.io/lessons/javascript-introducing-the-observable) - Video\n - [`rxjs` observables](http://reactivex.io/rxjs/class/es6/Observable.js~Observable.html) - Observables implementation\n - [`zen-observables`](https://github.com/zenparsing/zen-observable) - Observables implementation\n\n## Transform Streams\n\n`data` events on the stream will be emitted as events in the Observable. Since most native streams emit `chunks` of binary data, you will likely want to use a `TransformStream` to convert those chunks of binary data into an object stream. [`split`](https://github.com/dominictarr/split) is just one popular TransformStream that splits streams into individual lines of text.\n\n## Caveats\n\nIt's important to note that using this module disables back-pressure controls on the stream. As such, it should not be used where back-pressure throttling is required (i.e. high volume web servers). It still has value for larger projects, as it can make unit testing streams much cleaner.\n\n## License\n\nMIT"
}