https://github.com/oresoftware/line-stream-parser
Node.js transform stream - reads buffered data, writes buffers representing lines split by newline
https://github.com/oresoftware/line-stream-parser
line-parser nodejs npm stream stream-processing
Last synced: 11 months ago
JSON representation
Node.js transform stream - reads buffered data, writes buffers representing lines split by newline
- Host: GitHub
- URL: https://github.com/oresoftware/line-stream-parser
- Owner: ORESoftware
- License: mit
- Created: 2019-07-16T06:48:11.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-28T21:02:55.000Z (over 6 years ago)
- Last Synced: 2023-03-02T00:26:04.174Z (almost 3 years ago)
- Topics: line-parser, nodejs, npm, stream, stream-processing
- Language: Shell
- Size: 14.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.md
Awesome Lists containing this project
README
Travis build status:
[](https://travis-ci.org/ORESoftware/typescript-library-skeleton)
CircleCI build status:
[](https://circleci.com/gh/ORESoftware/typescript-library-skeleton/tree/master)
## LSP - Line Stream Parser
> Take a stream of characters and split by newlines (or custom delimiter)
### Install
```shell
npm i '@oresoftware/line-stream-parser'
```
### CLI interface
```shell
echo 'some\nchars' | parse_lines
```
### Node.js interface
```typescript
import LineParser from '@oresoftware/line-stream-parser'
process.stdin.resume().pipe(new LineParser()).on('data', d => {
console.log(String(d));
});
```