
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
A Server-Sent Events (SSE) parsing library built with modern design patterns
A Server-Sent Events (SSE) parsing library built with modern design patterns
# npm
npm install es-sse
# pnpm
pnpm add es-sse
# yarn
yarn add es-sse
import { parseSSE } from 'es-sse';
// Parse a single event
const eventChunk = 'event: test-event\ndata: test-data\n\n';
const result = parseSSE(eventChunk);
// Result will be:
// {
// data: [{
// event: 'test-event',
// data: 'test-data'
// }],
// restString: ''
// }
// Handle incomplete events with restString
let buffer = '';
const chunks = [
'event: first\ndata: first-data\n\nevent: second\ndata: second-data\n\nevent: third\ndata: third',
'-data\n\n'
];
// Process chunks
for (const chunk of chunks) {
buffer += chunk;
const result = parseSSE(buffer);
// Process complete events
for (const event of result.data) {
console.log('Received event:', event);
}
// Keep the rest for next iteration
buffer = result.restString;
}
// Final buffer state
console.log('Remaining buffer:', buffer); // Should be empty
FAQs
A Server-Sent Events (SSE) parsing library built with modern design patterns
The npm package es-sse receives a total of 2 weekly downloads. As such, es-sse popularity was classified as not popular.
We found that es-sse 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
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.