{"name":"rxjs-stream","version":"3.0.0","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.4","@types/mocha":"^5.2.5","@types/node":"^8.10.28","chai":"^4.1.2","coveralls":"^3.0.2","mocha":"^5.2.0","nyc":"^12.0.2","prettier":"^1.14.2","rimraf":"^2.6.2","rxjs":"^6.2.2","ts-node":"^7.0.1","tslint":"^5.11.0","typescript":"^3.0.1"},"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":"51751f3f205295d0e5487ef5dff322e07cbed2de","_id":"rxjs-stream@3.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.1","_npmUser":{"name":"jason-dent","email":"jason@streetsidesoftware.nl"},"dist":{"integrity":"sha512-xPmq/tc4gWdyBItWpeFe7o0+D1gxczU9ISrOLNAXI5ft/1Wdx/Fj7xz/w9UjCMOWrQtXA8s86ti3UA/SfrHd4g==","shasum":"76f259143db783660866459f043cc20ee7047351","tarball":"http://registry-npm.ywwl.com/rxjs-stream/download/rxjs-stream-3.0.0.tgz","fileCount":16,"unpackedSize":15729,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgXGUCRA9TVsSAnZWagAA8FoP/iL3zog+FQmCZ0ikItsH\n8QrHIBkMVhepUMPkMQp8np0Iag4yMuVuu4QQFGyKxT8p1TaXGobZUJFhO2Tq\nX1auo/HpmRELK8HCUTsdWYjwFo/Kcsw7AFwyuRAkfBcIbNhkI7sQEMmt9UIC\nXUbs1E9T65aqeIwwFEFZOtDsYdV7uAbK/PmGi5yzULgvp13Bcrg5xfxNKEK7\nVhUEwUhOhQQeb/eCVYN4SCqOc34pfRH+l46E7notW9pun/SWuigakU8DC4Yi\n8eJwtwXqMPNu5a+gk7/RmtDSum/J9K75oQ5cCF8GREFnUWDNnjVK/wfCt9bq\ngjoESnCeSRHQSb5euKRdsVo+XdLptWX2JsPEz/1zPlAb1h1x2SYI/dZGE8Db\nl98Of6IN96P6oTZUXOLcSawHGrrtSPJkuNUTKFRzx2oDGZRTcXxOwMCG3fNK\ncLFEeMMFac/+vwCNVSvmYSE5vxfoXnOs+MkXh3LKvInW0qLD1/A9cIKtuz+U\nQv9zskq7TJwXXyOSlNsQymdcmqL+Tt0SvLuVUxL1o21F4fybyd2CHGtoexOr\nfETa9tJcrVh8fOMH/yv1tQz+MAN8sxhnHh6nfFUZr61u4eOAH6qx+TRo5iaH\nYP0k8xYV5B87hy48yZ/y2cMWDaCkJG115B/P4yhmqC2WXLgbG3+sQyAsQYcX\nUyko\r\n=AWzc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDjTjzLugvmGPmDwS9ympVJZfYXrcw7OPwQxdnSxfukhQIgC+vdKgi7rkjiGuAgBZXWl65QWgcGd98YacspjEoBGLo="}],"size":5043,"noattachment":false,"key":"/rxjs-stream/-/rxjs-stream-3.0.0.tgz"},"maintainers":[{"name":"jason-dent","email":"jason@streetsidesoftware.nl"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rxjs-stream_3.0.0_1535209876280_0.7031061589313345"},"_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":1535209876343,"_cnpm_publish_time":1535209876343,"dist-tags":{"latest":"5.0.0"}}