{"name":"rxjs-stream","version":"3.1.1","description":"nodejs streams for rxjs 6","main":"dist/index.js","typings":"dist/index.d.ts","scripts":{"lint":"npm run check-spelling && npm run tslint -- --force --format verbose","lint-travis":"npm run check-spelling && npm run tslint","tslint":"tslint \"src/**/*.ts\"","check-spelling":"cspell 'src/**' '*.md' 'samples/**'","build":"npm run compile","clean":"rimraf ./dist","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\"","prepare":"npm run clean-build","prepublishOnly":"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.2.7","@types/fs-extra":"^8.0.1","@types/mocha":"^5.2.7","@types/node":"^8.10.59","chai":"^4.2.0","coveralls":"^3.0.9","cspell":"^4.0.44","fs-extra":"^8.1.0","lorem-ipsum":"^2.0.3","mocha":"^6.2.2","nyc":"^14.1.1","prettier":"^1.19.1","rimraf":"^2.7.1","rxjs":"^6.5.4","ts-node":"^8.5.4","tslint":"^5.20.1","typescript":"^3.7.4"},"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":"9dc0db98085195e0211545a406dcb5fac7336a69","_id":"rxjs-stream@3.1.1","_npmVersion":"6.4.1","_nodeVersion":"8.15.0","_npmUser":{"name":"jason-dent","email":"jason@streetsidesoftware.nl"},"dist":{"integrity":"sha512-GZG+EyvNqxpR3jypvALqacBrfxk4DsCnqLSQ5mxTlL1kliYEHSSZi5JV7HELwYIYDOn/AxaYxx5hHfsDl1QwEg==","shasum":"a102f3d07588e461e2b6acd059e4b55289c44837","tarball":"http://registry-npm.ywwl.com/rxjs-stream/download/rxjs-stream-3.1.1.tgz","fileCount":10,"unpackedSize":11246,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeE5CoCRA9TVsSAnZWagAAskEP/0Mp/Ti72pKik7tcA9EA\nrehgiu2HTkoLbnEPvSG3NPHLfI4DSjCZDcPmmfDsfNBk4jmBWwUIwW1PTyHb\nw6usIpxB1X+2G0URMeKIkYp1z4ZrCVQraFm93jdRWYbhWruka4lJ8SodQx9E\nWt60/QpBEs/D9rB7z26SJEwcnXv/rqtCdLma5p4OGVZhesTDTmty06RnYCa/\nFSxiN0uucEId1N9T0hPI2o6yng/Jz0UyrBZbSXnN8KUsup88NfEmv8iQIlZS\ns9Wd00CJHCl9UMbWYW8zGaDOpzohRnIYT2RPFOBZ/swMxUQ45iVsBWIKBjus\nwv+5/YqfGFU1YrmZS/2niEjembdc1I6HONEIVY07VvaEBKQN9ufQXnV9uvmF\n2rf23lCtB544eTZ2le+uiBGpqOlD4+S2tuYubab9eMSNgDRamytKpWeUOjr3\n2Qf1iVvhJoVhPU5HQhFCn64zjYLu7N6cNL9CxepSZVakfVgyWqhO/y1k9rRM\ncR1OVHhQtU6y0hvdNkxzuHs4MSgdCmbVp3XNL+3wHEEWdXaYmv9p0S5ZjBiy\nf5XKYXBYSoH8TXmdeymO9FQVSd52iV4/umiDh53828SyqdI0viZo/d8GQaxs\nYW2HkycX6acpCU4jq0GgAXb0GtVQy63PlI3BHlbCLt4LVjbg/7cpGv60rCqY\nSsR6\r\n=6ocu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH9mXjJEgthQf5PTLi1Koyw7ohBPnk6EoYTLGOx9ivezAiAnrlmv+iLZ3fCqm/HXe3OOBu5XgaeL9nWArzGNCSii+w=="}],"size":4120,"noattachment":false,"key":"/rxjs-stream/-/rxjs-stream-3.1.1.tgz"},"maintainers":[{"name":"jason-dent","email":"jason@streetsidesoftware.nl"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rxjs-stream_3.1.1_1578340520195_0.4212000379783363"},"_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":1578340520399,"_cnpm_publish_time":1578340520399,"dist-tags":{"latest":"5.0.0"}}