{"name":"rxjs-stream","version":"2.0.0","description":"nodejs streams for rxjs 5","main":"dist/index.js","typings":"dist/index.d.ts","scripts":{"clean":"rimraf ./dist","lint":"tslint --force --format verbose \"src/**/*.ts\"","lint-travis":"tslint \"src/**/*.ts\"","build":"npm run compile","clean-build":"npm run clean && npm run build","compile":"tsc -p .","watch":"tsc --watch -p .","tsc":"tsc -p .","coverage":"npm run generate-code-coverage","generate-code-coverage":"NODE_ENV=test nyc npm run test-ts","test-ts":"NODE_ENV=test mocha --compilers ts:ts-node/register --recursive --bail \"src/**/*.test.ts\"","test-watch":"npm run build && mocha --compilers ts:ts-node/register --watch --recursive \"src/**/*.test.ts\"","prepublish":"npm run clean-build && npm test","coverage-coveralls":"nyc report --reporter=text-lcov | coveralls","travis-coverage":"npm run generate-code-coverage && npm run coverage-coveralls","test":"mocha --recursive \"dist/**/*.test.js\""},"repository":{"type":"git","url":"git+https://github.com/Jason3S/rx-stream.git"},"keywords":["rxjs","5.0","node","stream"],"author":{"name":"Jason Dent"},"license":"MIT","bugs":{"url":"https://github.com/Jason3S/rx-stream/issues"},"homepage":"https://github.com/Jason3S/rx-stream#readme","devDependencies":{"@types/chai":"^4.1.3","@types/mocha":"^5.2.0","@types/node":"^8.0","chai":"^4.1.2","coveralls":"^3.0.0","mocha":"^5.1.1","nyc":"^11.7.1","rimraf":"^2.6.2","rxjs":"^6.0.0","rxjs-compat":"^6.0.0","ts-node":"^6.0.1","tslint":"^5.9.1","typescript":"^2.8.3"},"dependencies":{},"peerDependencies":{"rxjs":"^6.0.0"},"engines":{"node":">=8.0.0"},"nyc":{"include":["src/**/*.ts"],"exclude":[],"extension":[".ts"],"require":["ts-node/register"],"reporter":["json","html"]},"gitHead":"c6079fc6e30da5da9390c29faebe584f3680d5f5","_id":"rxjs-stream@2.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"jason-dent","email":"jason@streetsidesoftware.nl"},"dist":{"integrity":"sha512-kfpTaW64zUMz/zCP8+iHgTmeA8Qy01cIbTvqiHInkRbpepxybq/fUasLE8sYZf35y0JK2m3EFTsr1Oul4SXOrw==","shasum":"559d52800e3ee9e813bf77ede267bd88ddda85bc","tarball":"http://registry-npm.ywwl.com/rxjs-stream/download/rxjs-stream-2.0.0.tgz","fileCount":24,"unpackedSize":20995,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa4vGyCRA9TVsSAnZWagAA27sP/2VSNa0kUQZbbCSKpTdV\nvNOQxJNDw1BJ4jPxDLp/Cu3d13lUqL1xmHSZhvFr7CGXRGZ1sv8q5tO6eZnt\nM89m4PgdWzhNxTWYHDcUjBxDJoYhRKrN4jx4TxoxVRX8PsmdL2EbLcJRCrSo\nJwoDCIEYSCw4ToAYQXq9xf+AuBP6q+cWXr8keWiLNH6ybDkiQ6OsWZK61/aV\nR6XJARURu2vjF2lE88ZI/rkiSl97f4bG8LIjAt+WKW8m+aw29OFP7/IrOQzW\ns87Tu61ehXelodHTXwMSj0iiwVlNDxQnCpm4YtZ3dL0qaw1U1mT25IymJsxg\n/62c4wqkxVOAgeGJZeTSJm/OmTiRd3mTTqWVg61FWWn/t/PXP/tdDKxxZ3Fv\n9KfAojpFi09JI4XE/wGzrWB7q2UvSeRo75KctMPXPft+VPR9krpUtiWTNWVQ\nDs1CqZwnJzypjLRdYrw/reblFiah/QhRLeXYFDxdZ3nj4iII+OyjP6Yu1Gyn\nwpTUAvtJER+DhL0Q1G9GIgU7sRUUAv69PlDqCDsdFYKDbRP/GwClAVcU9tyU\nb34YFEdgiJJZCEAfWx8fT3Xtba2G7SmXuivCiKnaYcLSBGK60L9ajmtAf03F\nJRp+HaaxmDjQ6PNlT+/OLO5btttbpUay9cI9J8O2UQZ9vMxW5LBNAS8/agE4\nziFN\r\n=sR1o\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCfetBlqukNIsTlNnGzF6OgP88FG6VoOnvgdCdtB2q5dwIhALqKeCk8uiWuRYt0OvmrLfVylRoBEyGmPx32RxHJDXye"}],"size":6961,"noattachment":false,"key":"/rxjs-stream/-/rxjs-stream-2.0.0.tgz"},"maintainers":[{"name":"jason-dent","email":"jason@streetsidesoftware.nl"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rxjs-stream_2.0.0_1524822449729_0.0886476390172255"},"_hasShrinkwrap":false,"readme":"# rxjs-stream\n\nThis is a simple library for converting to and from NodeJS stream and [RxJS](https://rxjs.dev/) 7.\n\nThis was created to fill the gap left by [rx-node](https://www.npmjs.com/package/rx-node),\nwhich only works with rxjs 4.\n\n## Installation\n\n```sh\nnpm install --save rxjs rxjs-stream\n```\n\n## Usage\n\n### Writing to a stream.\n\n```typescript\nimport { rxToStream } from 'rxjs-stream';\n\nlet data = 'This is a bit of text to have some fun with';\nlet src = Rx.Observable.from(data.split(' '));\nrxToStream(src).pipe(process.stdout);\n```\n\n### Writing objects to a stream\n\nTo write objects, you must pass in the `ReadableOptions` with `objectMode` to be true: `{ objectMode: true }`\n\n```typescript\nimport { rxToStream } from 'rxjs-stream';\n\nlet data = 'This is a bit of text to have some fun with';\nlet wordObj = data.split(' ').map((text) => ({ text }));\nlet src = Rx.Observable.from(wordObj);\nlet stream = rxToStream(src, { objectMode: true });\n```\n\n### Read from a stream\n\n```typescript\nimport { rxToStream, streamToStringRx } from 'rxjs-stream';\n\n// Read stdin and make it upper case then send it to stdout\nlet ob = streamToStringRx(process.stdin).map((text) => text.toUpperCase());\n\nrxToStream(ob).pipe(process.stdout);\n```\n\n## Performance\n\nIt is recommended to buffer observable values before sending them to the stream.\nNode streams work better with fewer calls of a large amount of data than with many\ncalls with a small amount of data.\n\nExample:\n\n```typescript\nimport * as loremIpsum from 'lorem-ipsum';\nimport { rxToStream } from 'rxjs-stream';\n\nlet book = loremIpsum({ count: 1000, format: 'plain', units: 'paragraphs' });\nlet words = Rx.Observable.from(book.split(/\\b/));\nlet wordsBuffered = words.bufferCount(1000).map((words) => words.join(''));\nlet stream = rxToStream(wordsBuffered);\n\nstream.pipe(process.stdout);\n```\n\n## Compatibility\n\nThis library is tested with Node 12 and above.\n\n| rx-stream | RxJS | Node |\n| --------- | ---- | ---- |\n| 4.x       | 7.x  | >=12 |\n| 3.x       | 6.x  | >=10 |\n","publish_time":1524822449896,"_cnpm_publish_time":1524822449896,"dist-tags":{"latest":"5.0.0"}}