You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
jsonarrayfs is a Node.js library designed to facilitate efficient handling of JSON array data stored in files. It offers functionality for streaming JSON array elements in batches, allowing for reduced memory consumption when working with large datasets. Additionally, jsonarrayfs provides a method for appending new data to existing JSON array files without loading the entire dataset into memory.
3
+
"jsonarrayfs" is a Node.js library crafted for robust and memory-efficient management of massive JSON array files. It enables seamless handling of JSON arrays without the need to load the entire file into memory, making it perfect for efficiently managing large datasets without overwhelming system resources.
4
+
5
+
## Key Features
6
+
7
+
-**Stream Processing**: Read JSON array in manageable chunks (eg: 50k elements at a time) using stream.
8
+
-**On-the-Fly Filtering**: Apply filter to the stream to fetch only relevant data, reducing the data you handle even further.
9
+
-**Direct Appends**: Append new elements directly to the JSON array file, avoiding unnecessary loading, modification and rewriting.
10
+
11
+
## Benefits
12
+
13
+
-**Memory Optimization**: Process JSON array files with minimal memory usage, making it ideal for resource-constrained environments.
14
+
-**Handles Large Datasets**: Efficiently manage massive JSON array files without memory limitations.
15
+
-**Improved Performance**: Faster processing times due to efficient streaming, filtering and appending capabilities.
16
+
-**Enhanced Scalability**: Scales seamlessly with growing datasets, ensuring smooth performance.
4
17
5
18
## Installation
6
19
@@ -10,35 +23,54 @@ To install jsonarrayfs, use:
10
23
npm install jsonarrayfs
11
24
```
12
25
13
-
## Features
26
+
## Usage
14
27
15
-
- Stream JSON array elements:
28
+
- Stream Processing:
16
29
17
-
```js
30
+
```ts
18
31
import { createReadStream } from"jsonarrayfs";
19
32
20
33
// Create a streamer to read JSON array elements from a file
Copy file name to clipboardExpand all lines: package.json
+10-3Lines changed: 10 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
{
2
2
"name": "jsonarrayfs",
3
3
"version": "1.0.1",
4
-
"description": "A Node.js library to stream JSON array elements from files in custom-sized chunks and effortlessly append data to existing arrays.",
4
+
"description": "Efficiently handle JSON array files in Node.js with minimal memory usage. Perfect for efficiently processing large data volumes without worrying about memory limitations.",
0 commit comments