# jsonsurge

> A JSON parsing utility for streaming data

Latest version **1.0.6** (published 2023-09-25) · ISC license · 0 weekly downloads

## Install

```sh
npm install jsonsurge
pnpm add jsonsurge
yarn add jsonsurge
bun add jsonsurge
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2023-09-25 |
| First published | 2023-09-25 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Gaurav |
| Maintainers | gauravmishra0 |

## Links

- npm: https://www.npmjs.com/package/jsonsurge
- npm.io page: https://npm.io/package/jsonsurge

## Recent versions

- 1.0.6 (latest) — 2023-09-25
- 1.0.5 — 2023-09-25
- 1.0.4 — 2023-09-25
- 1.0.3 — 2023-09-25
- 1.0.2 — 2023-09-25
- 1.0.1 — 2023-09-25
- 1.0.0 — 2023-09-25

## README

# StreamJSONParser

StreamJSONParser is a JavaScript module that provides a way to parse JSON data from a readable stream in an asynchronous and efficient manner. It is particularly useful when dealing with streaming JSON data, such as data received from server-sent events (SSE) or other real-time data sources.

## Installation

You can install StreamJSONParser using npm or yarn:

```shell
npm install stream-json-parser
```

or

```shell
yarn add stream-json-parser
```

## Usage

To use StreamJSONParser, you need to import it into your JavaScript or TypeScript code:

```javascript
import streamJSONParser from 'stream-json-parser';
```

### Example Usage

Here is an example of how to use StreamJSONParser to parse JSON data from a readable stream:

```javascript
import streamJSONParser from 'stream-json-parser';

// Create a ReadableStream (e.g., from a fetch response)
const response = await fetch('https://example.com/streaming-data');
const stream = response.body;

for await (const chunk of streamjsonparser(response.body)) {
                console.log(chunk)
            }
```

### How It Works

The `streamJSONParser` function accepts a readable stream as its input and returns an asynchronous generator that yields parsed JSON objects as they are received from the stream.

## Contributing

If you'd like to contribute to StreamJSONParser, please open an issue or submit a pull request on [GitHub](https://github.com/gauravmishra0/StreamJSONParser).

## License

StreamJSONParser is licensed under the [MIT License](LICENSE).

## Acknowledgments

StreamJSONParser is inspired by the need for efficient parsing of streaming JSON data in real-time applications.

## About

StreamJSONParser is maintained by Gaurav mishra. You can contact me at garvmishra9@gmail.com.

For more information, visit the [GitHub repository](https://github.com/gauravmishra0/StreamJSONParser).

---
_Source: https://npm.io/package/jsonsurge · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
