Options
All
  • Public
  • Public/Protected
  • All
Menu

line-observable-rxjs — Reference

Line Observable RxJs

Convert an input stream to observable of lines

Usage Example

We have the following script:

// script.js
const { getLinesFromStream } = require('line-observable-rxjs')
getLinesFromStream(process.stdin).subscribe({
  next: line => console.log('line>', line.trim()),
  complete: () => console.log('done.')
})

Run the script:

printf 'abc\ndef\nghi' | node script.js

Expected Output:

line> abc
line> def
line> ghi
done.

License

MIT © Hoàng Văn Khải

Generated using TypeDoc