{"name":"rxjs-stream","version":"5.0.0","description":"nodejs streams for rxjs 7","main":"dist/index.js","typings":"dist/index.d.ts","scripts":{"lint":"npm run check-spelling && eslint . --fix","lint-travis":"npm run check-spelling && eslint .","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","release":"npx standard-version","travis-coverage":"npm run generate-code-coverage && npm run coverage-coveralls","test":"mocha --recursive \"dist/**/*.test.js\"","update-packages":"npm i && npx npm-check-updates -t minor -u && rimraf node_modules package-lock.json && npm i"},"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":{"@istanbuljs/nyc-config-typescript":"^1.0.2","@types/chai":"^4.3.1","@types/mocha":"^9.1.1","@types/node":"^17.0.40","@typescript-eslint/eslint-plugin":"^5.27.1","@typescript-eslint/parser":"^5.27.1","chai":"^4.3.6","coveralls":"^3.1.1","cspell":"^6.1.1","eslint":"^8.17.0","eslint-config-prettier":"^8.5.0","eslint-plugin-import":"^2.26.0","eslint-plugin-node":"^11.1.0","eslint-plugin-prettier":"^4.0.0","eslint-plugin-promise":"^6.0.0","fs-extra":"^10.1.0","lorem-ipsum":"^2.0.4","mocha":"^10.0.0","nyc":"^15.1.0","prettier":"^2.6.2","rimraf":"^3.0.2","rxjs":"^7.5.5","ts-node":"^10.8.0","typescript":"^4.7.3"},"dependencies":{"@types/fs-extra":"^9.0.13"},"peerDependencies":{"rxjs":"^7.0.0"},"engines":{"node":">=14"},"nyc":{"extends":"@istanbuljs/nyc-config-typescript","all":true,"include":["src/**/*.ts"],"exclude":["**/*.test.ts"],"extension":[".ts"],"reporter":["lcov","json","html"]},"gitHead":"5af5f58011aa89c345f7e49612abaa82f1f3f5cd","_id":"rxjs-stream@5.0.0","_nodeVersion":"16.14.2","_npmVersion":"8.10.0","dist":{"integrity":"sha512-msDp3f8QLbm1BCFdsQ+e1pJjQjpzqPgHKpR5Q5WfjdkuGpjfOqBXVum+lMOU43IxhKykTKhOnxqJB6dgkBI/KQ==","shasum":"654d6c109d38c7bceeff0abc3b532ec73bd161b7","tarball":"http://registry-npm.ywwl.com/rxjs-stream/download/rxjs-stream-5.0.0.tgz","fileCount":9,"unpackedSize":13460,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG2lO7aMW749SJEgBMLjVtpo7S+d79l8HtbFLweK4D/jAiB1HO4vez0ZOOylcokAYvFZTfB74J5Oo5Ol40HV82eTyg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJin1vTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqMeRAAgvDXQ5H9FVSn/jY2EMwn1yKSRSXUaPiykYp5/fvjb1cjz+D8\r\nOUmajeHv9SjGMCt1nDoUgzmFbCE2oUjLHJRV/Qbvt2bSSoNaIajNHg/PTxI9\r\nhRpGTP30FOB98SjVTw2tu7rbJbpUPNDErCV5R2ys6/Dw4S6Yb3A7OPk90RuL\r\nChOoqYk4KexQSbHjc195t3Yl4Q9Cp2HXYORiWzoaZUxiwNDU+LG3iqgeG/4+\r\nGS72KsbqJ+1FE/FtDk+1T5KPeTG3YVgOqrUdZ+KYl97kJE6emFvdhXPokskW\r\nPTdnkBnIUh4/mlPFMLLwU443X+HklNE/XmWH52iaRlQlKErAoUuBoxZAvR+9\r\n8tnrFGj5qs6yqTTnGtm1IIMl6CdyOMWXxFJ7pyBgvHhBDP1OHf1t1TLgdtTM\r\nIdleoNeKsiBPnB8FjtrADDgWYrTqJowjDy7O/CUj9GN7XPHQVmXQaBZxBRcc\r\n65iO+4COIwt+McoHqh5v1ccyq5cyswLLkAeoiUS/JKZ9TStWMa0OsAYOwEky\r\nkI0jhkq9bg8GNcp1z1EOnCZ0ZAF69KIBK3YTbxZaIVgZsLYLSE2+UcSi6J4j\r\nyHqgGjsvP5CBX9bvDpV9TOlxEfuruWMatO11sLsfBJfX0PiI6x2wOqB0pkXl\r\nXQGNiVcKdQjyflk3KYGTy4LKSLMxQ7L3SFo=\r\n=yuex\r\n-----END PGP SIGNATURE-----\r\n","size":4709,"noattachment":false,"key":"/rxjs-stream/-/rxjs-stream-5.0.0.tgz"},"_npmUser":{"name":"jason-dent","email":"jason@streetsidesoftware.nl"},"directories":{},"maintainers":[{"name":"jason-dent","email":"jason@streetsidesoftware.nl"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rxjs-stream_5.0.0_1654610899438_0.8215497312887801"},"_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":1654610899646,"_cnpm_publish_time":1654610899646,"dist-tags":{"latest":"5.0.0"}}