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
Specialized Node.js library for memory-efficient operations on JSON array files. Stream individual elements from large JSON array filesand append new elements without loading the entire array into memory. Perfect for processing large-scale JSON array datasets without memory limitations.
8
+
Specialized Node.js library for memory-efficient operations on JSON arrays. Stream individual elements from large JSON arrays (files, network responses etc.) and append elements to array files without loading the entire array into memory. Perfect for processing large-scale JSON array datasets without memory limitations.
9
9
10
10
## Why Use This?
11
11
12
-
- 🎯 **Specialized**: Purpose-built for JSON array files
12
+
- 🎯 **Specialized**: Purpose-built for JSON arrays
13
13
- 💾 **Memory Efficient**: Process arrays of any size without loading them entirely
14
14
- ⚡ **High Performance**: Optimized streaming and batch operations
15
15
- ✍️ **Direct Updates**: Append elements without rewriting the entire file
@@ -21,76 +21,90 @@ Specialized Node.js library for memory-efficient operations on JSON array files.
21
21
npm install jsonarrayfs
22
22
```
23
23
24
-
## Usage
24
+
## Examples
25
+
26
+
### 1. Stream from File
27
+
28
+
Processs a large JSON array file (e.g., application logs) without loading it into memory:
A transform stream that reads JSON array files and emits elements one by one for efficient processing. When processing arrays containing `null` values, it uses a special sentinel value (`JsonArrayStream.NULL`) to distinguish between JSON `null` and stream EOF.
107
+
A transform stream that parses JSON array elements one by one for efficient processing. When processing arrays containing `null` values, it uses a special sentinel value (`JsonArrayStream.NULL`) to distinguish between JSON `null` and stream EOF.
94
108
95
109
#### Constructor
96
110
@@ -100,7 +114,7 @@ new JsonArrayStream(encoding?: string)
Copy file name to clipboardExpand all lines: package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
{
2
2
"name": "jsonarrayfs",
3
3
"version": "1.2.1",
4
-
"description": "Specialized Node.js library for memory-efficient operations on JSON array files. Stream individual elements from large JSON array filesand append new elements without loading the entire array into memory. Perfect for processing large-scale JSON array datasets without memory limitations.",
4
+
"description": "Specialized Node.js library for memory-efficient operations on JSON arrays. Stream individual elements from large JSON arrays (files, network responses etc.) and append elements to array files without loading the entire array into memory. Perfect for processing large-scale JSON array datasets without memory limitations.",
0 commit comments