{"name":"rxjs-stream","version":"2.0.3","description":"nodejs streams for rxjs 6","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 --require ts-node/register --recursive --bail \"src/**/*.test.ts\"","test-watch":"npm run build && mocha --require 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","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","ts-node":"^6.0.1","tslint":"^5.9.1","typescript":"^2.8.3"},"dependencies":{},"peerDependencies":{"rxjs":"^6.0.0"},"engines":{"node":">=8.0.0"},"files":["dist","src","!**/*.test.*","!**/*.spec.*"],"nyc":{"include":["src/**/*.ts"],"exclude":[],"extension":[".ts"],"require":["ts-node/register"],"reporter":["json","html"]},"gitHead":"8eaa2bb388d0183e21a0a57fe2694452679a933d","_id":"rxjs-stream@2.0.3","_npmVersion":"5.6.0","_nodeVersion":"10.0.0","_npmUser":{"name":"jason-dent","email":"jason@streetsidesoftware.nl"},"dist":{"integrity":"sha512-i8sN1i6hld1n0gK8pJEtJIERwz5MgpRvVx3US9tPG1ynJSonFq/VlRx2DFSx0zTyhE4Vl96/rIYSZ6lJdP810g==","shasum":"9f84c815565f07940dc522afdf2bb4ddcaa9400d","tarball":"http://registry-npm.ywwl.com/rxjs-stream/download/rxjs-stream-2.0.3.tgz","fileCount":16,"unpackedSize":12560,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa5LI6CRA9TVsSAnZWagAAoz8P/R4Eol0QWEhm6LB8tPdm\nx+kLspx/X1oCf/wQERL9r4WLvQjsXPE9A2oSN0s04yFzUupK6MmyAdyjc2OK\n3R4Y/Tjb+46+xiWXHLyDpcby4fq4fRZ3RucgDKx9JQok1mhT6GZE9pbvfr2i\nOaR0Qxf11nVTvMCdiD4XJEV1rg71Y63QiOUhvl7bQ5WO3J1dJbMeLb6xDtkG\nevPpX8DqnZtxibs1yFTldz82If2Bf0Uwx0UgfTr8mjqaUqy80gucOdEZYlyF\nT4S4vIlhTGUT6NFBJIRtWdUW+jXztixvVrEOQeACY8FrMPoQLD+paJv9mXT7\n6DKp0UiPKGUYEwyMKCKteg1YQGl9Jme5BflsoUpMK05MwfoxE0MzXQHOQ0X3\nnjFDlll+iUeSEpXp8yCraBYbzRcY0T/DnVyU5yeM2puD6elU/6DStEfTAPa8\n8cfKyswC0IRsdhUAghOeyVH4SaS32VZPv8zoqTpkD1pIxxITKo4ayKGWSjxn\n00cywHwEaTHXApIJG4L9SbxVTaUsB5n2JJeVaFnqJndMT/8mAaVyiiQPjDO1\nefEb+caYwtER/GC3xcQ1hkMpeJifyq4+UfMLPQPIlbGL8u8D+z4Y4F3KC9CI\n6PpnpKYLIftsUApknbX8iO/6xtErhw3ugpJMQGqowiWVE/I3o8XW7DUIRmfp\no0dc\r\n=zZzo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAnmApUk4hQ6pGXKgiHYTnpjZISTd6xc1snM9xFyyIERAiEAv1KZOjTPa85+bW99aRAMvD1AtcSrYS324ae0Rqvqm0o="}],"size":4658,"noattachment":false,"key":"/rxjs-stream/-/rxjs-stream-2.0.3.tgz"},"maintainers":[{"name":"jason-dent","email":"jason@streetsidesoftware.nl"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rxjs-stream_2.0.3_1524937273800_0.11415769364719552"},"_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":1524937273903,"_cnpm_publish_time":1524937273903,"dist-tags":{"latest":"5.0.0"}}