https://github.com/bobbyg603/readlines-web
Read files line-by-line using ReadableStreams
https://github.com/bobbyg603/readlines-web
nodejs readable readable-stream readline streams web
Last synced: 12 months ago
JSON representation
Read files line-by-line using ReadableStreams
- Host: GitHub
- URL: https://github.com/bobbyg603/readlines-web
- Owner: bobbyg603
- Created: 2023-11-02T17:24:37.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-02T17:28:04.000Z (over 2 years ago)
- Last Synced: 2024-04-15T09:12:30.512Z (almost 2 years ago)
- Topics: nodejs, readable, readable-stream, readline, streams, web
- Language: TypeScript
- Homepage: https://bugsplat.com
- Size: 9.77 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://bugsplat.com)
#
BugSplat
### **Crash and error reporting built for busy developers.**
# readline-web
A nifty little library for reading files line-by-line using ReadableStreams and is compatible in both node.js and the browser. Inspired by this [post on MDN](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamDefaultReader/read#example_2_-_handling_text_line_by_line).
## Usage
Install this package locally.
```sh
npm i readline-web
```
Import `makeTextFileLineIterator` and create an iterator.
```ts
import { makeTextFileLineIterator } from 'readlines-web';
```
You can process each line in a loop.
```ts
for await (let line of iterator) {
console.log(line);
}
```
Or process a single line using `next()`.
```ts
const { value, done } = await iterator.next();
```
## 🐛 About
[BugSplat](https://bugsplat.com) is a software crash and error reporting service with support for [macOS](https://docs.bugsplat.com/introduction/getting-started/integrations/desktop/macos), [iOS](https://docs.bugsplat.com/introduction/getting-started/integrations/mobile/ios), [Qt](https://docs.bugsplat.com/introduction/getting-started/integrations/cross-platform/qt), [Unreal Engine](https://docs.bugsplat.com/introduction/getting-started/integrations/game-development/unreal-engine) and [many more](https://docs.bugsplat.com/introduction/getting-started/integrations). BugSplat automatically captures critical diagnostic data such as stack traces, log files, and other runtime information. BugSplat also provides automated incident notifications, a convenient dashboard for monitoring trends and prioritizing engineering efforts, and integrations with popular development tools to maximize productivity and ship more profitable software.