{"name":"rxjs-stream","version":"3.0.2","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.7","@types/mocha":"^5.2.6","@types/node":"^8.10.48","chai":"^4.2.0","coveralls":"^3.0.3","fs-extra":"^8.0.1","lorem-ipsum":"^2.0.2","mocha":"^6.1.4","nyc":"^14.1.1","prettier":"^1.17.1","rimraf":"^2.6.3","rxjs":"^6.5.2","ts-node":"^8.1.0","tslint":"^5.16.0","typescript":"^3.4.5"},"dependencies":{},"peerDependencies":{"rxjs":"^6.0.0"},"engines":{"node":">=8.0.0"},"nyc":{"include":["src/**/*.ts"],"exclude":["**/*.test.ts"],"extension":[".ts"],"require":["ts-node/register"],"reporter":["json","html"]},"gitHead":"6bf1991a1641edd6a53d21cc332565b101c919e4","_id":"rxjs-stream@3.0.2","_nodeVersion":"10.15.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-DASSTemCVcghTvUGKd6g2QYQ1Y/tCKwxZ2Xj41+PH0GHRLQLknwLIIHtPfbK1Cb7aorf0jZXAe123oSMHXLn7Q==","shasum":"9af52f97fb90daa7bcc1ecc40c65532eb6f05fed","tarball":"http://registry-npm.ywwl.com/rxjs-stream/download/rxjs-stream-3.0.2.tgz","fileCount":10,"unpackedSize":10090,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc20A3CRA9TVsSAnZWagAAMroQAIhmbFpmYaCjBN2rmJgl\n39sh+SXI5QIh7k07xPCpPqdNAE3N3kyFSD1p9AuwfyKErVSqMP80RslYAmya\nqpJ9HXLSgp4Y5D5WaRSDDGfZdZLKLDFGWg6Qvx7tnMwal7TbR6IJi2iToZOA\n3D/Hw2DIRvenI1GiGmeovO1JeXyMdEVp6fl3uBis6QLSVV9WlnibZM7Kscmm\nG8Vb2BrlfNd8rX7lb8jD5RSHOQW4CFllMIwRPg5MZUtzkDep8cZmWqS4va+5\nadX2x00tqd+ZTpaVzigKwh7DSlanHCmhxzowP2ietZiGDh8IgDpmueOv5GZz\n57f5QHlzCH0eVzOTKDpt3CuwcEdtR0epehfp6Q4+LGqyYtA8IrK4EqGKolGK\nSJGCg6cTB+qFTjoFO3H8ookmMJNTJr3dAZJDE2t/lFuoVynf3MtoHJvNZQQN\nyMiY6/erwmIafSVeXMvx2cuNGGdKv9uAeQTQ+NG1/Hwd/2T/DluLrCTJ06j7\nW3Cx3XuMUEcDh0ox8N79I/AAMHlZcldZRD3IA4hYOE8rLWkhXhndeT4CHkmy\nQ35aFDr7Uf1fsYf3CR+q2qx7/FuO3v9q1hh+PHCpIjnQiOSnYLoN4sgjIYRd\n+V+0V4ldEhsoX8iDSmCCeeBjNaz0i24yW+WOFgJfBj/lo1n1qy20IYLgb5hM\nWUvt\r\n=a18V\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCiGco36qBzvgCQTiLySNnROM3VSccJEY+FES9ZBWuZFgIhAKEolOuxqaQbgA9fNWNsDgPp9YtKl6KPxIQHx/A3Kf6l"}],"size":3842,"noattachment":false,"key":"/rxjs-stream/-/rxjs-stream-3.0.2.tgz"},"maintainers":[{"name":"jason-dent","email":"jason@streetsidesoftware.nl"}],"_npmUser":{"name":"jason-dent","email":"jason@streetsidesoftware.nl"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rxjs-stream_3.0.2_1557872694936_0.32365152753214743"},"_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":1557872695102,"_cnpm_publish_time":1557872695102,"dist-tags":{"latest":"5.0.0"}}