{"name":"rxjs-stream","version":"1.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":"^3.4.34","@types/mocha":"^2.2.39","@types/node":"^7.0.5","chai":"^3.5.0","coveralls":"^2.11.16","mocha":"^3.2.0","nyc":"^10.1.2","rimraf":"^2.5.4","ts-node":"^2.1.0","tslint":"^4.4.2","rxjs":"^5.1.0","typescript":"^2.1.6"},"dependencies":{},"peerDependencies":{"rxjs":"^5.0.3"},"engines":{"node":">=6.0.0"},"nyc":{"include":["src/**/*.ts"],"exclude":[],"extension":[".ts"],"require":["ts-node/register"],"reporter":["json","html"]},"gitHead":"a521ca75060c0317577c7013e08be93170c54837","_id":"rxjs-stream@1.0.0","_shasum":"1b7c9e53b7b34cf1d858e46fd974e7f66f48b7f5","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.5.0","_npmUser":{"name":"jason-dent","email":"jason@streetsidesoftware.nl"},"dist":{"shasum":"1b7c9e53b7b34cf1d858e46fd974e7f66f48b7f5","tarball":"http://registry-npm.ywwl.com/rxjs-stream/download/rxjs-stream-1.0.0.tgz","integrity":"sha512-sAxPczKFWF/oTo9DtK0hkJzVpsXRbETvuJhVn83IbSogAPIuIzJfQRhTObYUk/2x5MDAH8Z+p8edzFtrgoSLAg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCH28jCGliwoIM3G95YTSMNXsQnUkWgdz0MBhaj0oVJ/QCIGlXXOtkhIsy27a67RN18IuQSxZc2c7jlkfoqBiAVWug"}],"size":4987,"noattachment":false,"key":"/rxjs-stream/-/rxjs-stream-1.0.0.tgz"},"maintainers":[{"name":"jason-dent","email":"jason@streetsidesoftware.nl"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/rxjs-stream-1.0.0.tgz_1486989381056_0.7222142575774342"},"directories":{},"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":1486989381600,"_cnpm_publish_time":1486989381600,"dist-tags":{"latest":"5.0.0"}}