jsonarrayfs
Advanced tools
+1
-1
| { | ||
| "name": "jsonarrayfs", | ||
| "version": "1.0.0", | ||
| "version": "1.0.1", | ||
| "description": "A Node.js library to stream JSON array elements from files in custom-sized chunks and effortlessly append data to existing arrays.", | ||
@@ -5,0 +5,0 @@ "exports": { |
+2
-2
@@ -21,3 +21,3 @@ # jsonarrayfs <img src="https://img.shields.io/npm/dm/jsonarrayfs" /> | ||
| // Create a streamer to read JSON array elements from a file | ||
| const streamer = await createReadStream("./data.json"); | ||
| const streamer = await createReadStream("./data.json", { encoding: 'utf-8' }); | ||
@@ -42,3 +42,3 @@ // Stream JSON array elements in batches of 100 | ||
| // Append new data to the existing JSON array file | ||
| await appendFile("./data.json", ...newData); | ||
| await appendFile("./data.json", 'utf-8', ...newData); | ||
| ``` | ||
@@ -45,0 +45,0 @@ |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
18688
0.17%