{"name":"rxjs-stream","version":"1.3.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":"^7.0.61","chai":"^4.1.2","coveralls":"^3.0.0","mocha":"^5.1.1","nyc":"^11.7.1","rimraf":"^2.6.2","rxjs":"^5.5.10","ts-node":"^6.0.1","tslint":"^5.9.1","typescript":"^2.8.3"},"dependencies":{},"peerDependencies":{"rxjs":"^5.5.0"},"engines":{"node":">=6.0.0"},"nyc":{"include":["src/**/*.ts"],"exclude":[],"extension":[".ts"],"require":["ts-node/register"],"reporter":["json","html"]},"gitHead":"d46c763e2fc207edc02cc4dc47868e66151d09d3","_id":"rxjs-stream@1.3.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"jason-dent","email":"jason@streetsidesoftware.nl"},"dist":{"integrity":"sha512-Vj86/1qAYvCApBOIi7gghVteCrMCXTnQxICPnW/D+4vtFIpgSE/xDegUDYJy9bwKyxR7VteVDhZyCvQt4RV/xQ==","shasum":"63c8b2a2322de0893cf46046ceb25feeaf43b35c","tarball":"http://registry-npm.ywwl.com/rxjs-stream/download/rxjs-stream-1.3.0.tgz","fileCount":24,"unpackedSize":21207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa4uo1CRA9TVsSAnZWagAAONMP/2LZLRBFXOyRp2ivZp7t\noBcK8GWvEqRyQpX4IHV6i+EFWIdZXQYxRPtddUTT2mvQsEBErBdJ8P2hzwCB\nx1KUCcbLzh7XhMqNw7P0BaErGqfQV7EPGenp5PWYe+1Ec8CG6s0vYuy787xc\n3m/cslivOvMOsfCLG6YlQj+gH37xMsVoaMstAprqAqWwEsyqGH56mXS5IUVU\nfTxBlh2hwgLF/a4DZD716Y7ODf4QTW6bFMmxgfkK8ohsu9pezBwXttcK5FxZ\nFOuOn2qyYw5vfbnOsPuBRTGQr6uaS1w3LR8YRba4YEhf8VLFzXvZ2aN7tp2F\nioCays1E/rflUqhqxC9EoS+PrSsFAtACVKDmmOlfP1vE/dP5cJj0ZvUR5niY\nJBEm71HsHe7pcsg9PSQ32ot1kFDXVDJJAg9fVpA/ghAioBPkne2dbCDqKuWH\nwEYUTVBfZyrSjmf4wioRE2cx6ck5etCG5gqMDoOk/6CBvqF7W6UOWvMdOCRd\nequ0FVOYEaZcBH1A1BzEOMrybYSHQ1dEdNg4ixnzV2WY4mvlpTo9aoBvsbF6\nYcViJVHlPsISTGvGIKjU3jzqhenCXnilCYgibsMCkorZAa4QFgxQWv+WHXVv\nrhx7dyxxIHHKfRMjGEJ35SJ6n+vQtLEpcujm2WTrA2q3yrGGO/iiM+4BSvL9\njde4\r\n=0di2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCQjgkS/gbjipbpXJR5cgVmCviXXpMsCV/enOm3DBgNCAIgcWM9xhoIlAWBNjFyNXQ5MXdCqGzTQoGHwu03c+qgsYI="}],"size":7021,"noattachment":false,"key":"/rxjs-stream/-/rxjs-stream-1.3.0.tgz"},"maintainers":[{"name":"jason-dent","email":"jason@streetsidesoftware.nl"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rxjs-stream_1.3.0_1524820532821_0.00342260988095644"},"_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":1524820532928,"_cnpm_publish_time":1524820532928,"dist-tags":{"latest":"5.0.0"}}