{"name":"rxjs-stream","version":"3.3.0","description":"nodejs streams for rxjs 6","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","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.21","@types/fs-extra":"^9.0.12","@types/mocha":"^8.2.3","@types/node":"^16.3.0","@typescript-eslint/eslint-plugin":"^4.28.3","@typescript-eslint/parser":"^4.28.3","chai":"^4.2.0","coveralls":"^3.1.1","cspell":"^5.6.6","eslint":"^7.31.0","eslint-config-prettier":"^8.3.0","eslint-plugin-import":"^2.23.4","eslint-plugin-node":"^11.1.0","eslint-plugin-prettier":"^3.4.0","eslint-plugin-promise":"^5.1.0","fs-extra":"^10.0.0","lorem-ipsum":"^2.0.3","mocha":"^8.4.0","nyc":"^15.0.0","prettier":"^2.3.2","rimraf":"^3.0.2","rxjs":"^6.6.7","ts-node":"^10.0.0","typescript":"^4.3.5"},"dependencies":{},"peerDependencies":{"rxjs":"^6.0.0"},"engines":{"node":">=8.3.0"},"nyc":{"include":["src/**/*.ts"],"exclude":["**/*.test.ts"],"extension":[".ts"],"require":["ts-node/register"],"reporter":["lcov","json","html"]},"gitHead":"fa545afac3e454cb250c2374b6cb2ee54281bdfa","_id":"rxjs-stream@3.3.0","_nodeVersion":"14.17.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-Btxm8WUsvvAaQHS/iCcoYqQtezEzz5M4hTb0d1H6Oc+h0Xx/evpy0hWeo+YPQd2GhpmJkDaIoXbAyVh4hA4cRA==","shasum":"5fbc21fbd809ba6d27807d293518e1742154d51a","tarball":"http://registry-npm.ywwl.com/rxjs-stream/download/rxjs-stream-3.3.0.tgz","fileCount":10,"unpackedSize":14436,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg9GhiCRA9TVsSAnZWagAA2q4P/R9R5oH4+URoJAEtCULI\nTjwd1zXUkI3rDpx1d79Jr6SKGoeypqoCqmWm/EM6OsCjIlCMWe/RYgbCBZTd\n6Xl2BpDURw6A6UKFt6YX0nBu9FtBw8qfZDsuYobFaU/VyrA1FO7NqLxuXQND\nr880FtUHYoy0wXYyYJB+tRP/Q0VSkYble16NI5GLUqlGAeh8Eq5T5QPTnW8o\nxSTjjzI7A10n1MM65RgKNm0xIXRyN8K+6UqvEJxNnU1riLmlhUGmiH6gFLpb\nWU8Y9LIcORn3Ju31RRKTeIIvA01NlhWz42fmeVLM7RC55serHB47/lnCq56d\nOmqpgGC7d1Tql0DrWyaj4LMV53SGHYxgvWA0A7R/cxSvnF3DQcyLjEKZ0jxa\nbbWw9cgZ8RY/r9Zu428fqlt7QMyIVUjQwZIuuaDjSg/viv4z0/MnEgpdexNg\nXHyKWzyIdAwBZcsNhZDobS1wGQANz5BQXVT9PcJWyngt4tVCamhJsvwYg17w\nLXS5qtXh1NRZZM2MuWQDZelwdrFrmEiMAxHwM94vk3PirBI4S77OgcsEt5U6\nNZsmwOo2nPBVq5x1d2SuE+jRtwKKmcHUhkUe74PhkAHxBaXrw9nmDRtwO28g\n/h674prir/w0GgFItb4OyHKA25W9yEQO4Dmn50JK292K6rHrxfimF9TSxDsL\n7lpC\r\n=QowN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF8YIKDaE4/UEj8SNQN3i4+cbmYbHgXfAKrMTxBmq7BeAiB/oULJuJT96qcb3qOoQ/L8nmGaBQetZ3b/DoBn+HliKw=="}],"size":5145,"noattachment":false,"key":"/rxjs-stream/-/rxjs-stream-3.3.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_3.3.0_1626630242525_0.9146066550389722"},"_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":1626630242686,"_cnpm_publish_time":1626630242686,"dist-tags":{"latest":"5.0.0"}}