Shared utilities for Amux
@amux.ai/utils provides shared utilities used across Amux packages, including SSE stream parsing, error handling, and more.
pnpm add @amux.ai/utils
# or
npm install @amux.ai/utils
# or
yarn add @amux.ai/utils- SSE Parser: Parse Server-Sent Events streams
- Error Handler: Unified error handling utilities
- Type Guards: TypeScript type guard utilities
import { parseSSE, createError } from '@amux.ai/utils'
// Parse SSE stream
const event = parseSSE('data: {"message": "hello"}\n\n')
// Create standardized error
const error = createError('API request failed', { statusCode: 500 })MIT © isboyjc