
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
jsonarrayfs
Advanced tools
Efficiently handle JSON array files in Node.js with minimal memory usage. Perfect for processing large data volumes without worrying about memory limitations.
"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.
To install jsonarrayfs, use:
npm install jsonarrayfs
import { createReadStream } from "jsonarrayfs";
// Create a streamer to read JSON array elements from a file
const streamer = await createReadStream("./data.json", { encoding: "utf-8" });
// Stream JSON array elements in batches of 100
for await (const chunk of streamer.stream(100)) {
// Your processing logic here
}
import { createReadStream } from "jsonarrayfs";
const streamer = await createReadStream<{ offer: boolean; price: number }>(
"./data.json",
{ encoding: "utf-8" }
);
// Add filter to the stream to fetch only relevant elements
for await (const chunk of streamer.stream(
100,
(element) => element.price < 500 || element.offer
)) {
// Your processing logic here
}
import { appendFile } from "jsonarrayfs";
// Simulate new data to append
const newData = [
{ id: 1, name: "Earth", price: 1000, offer: true },
{ id: 2, name: "Moon", price: 500, offer: false },
];
// Append new data to the existing JSON array file
await appendFile("./data.json", "utf-8", ...newData);
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
FAQs
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 proc
The npm package jsonarrayfs receives a total of 7 weekly downloads. As such, jsonarrayfs popularity was classified as not popular.
We found that jsonarrayfs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.