Skip to content

API reference

fetchstream-js ships a small, focused public surface. Everything you need is exported from the root entry point; framework- and runtime-specific extras live under subpath imports.

Subpath imports

Import pathProvides
fetchstream-jsfetchStream, streamJSON, parse, StreamHandle
fetchstream-js/nodeEverything above, plus streamFrom(source)
fetchstream-js/parserJSONStreamParser (low-level SAX)
fetchstream-js/pickerStreamPicker (path-aware materializer)
fetchstream-js/pathcompilePath, matches, prefixMatches, pathToString

Top-level functions

Types

  • StreamHandle — chainable, awaitable handle returned by every entry point

Low-level primitives

Conventions

  • Every async API supports AbortSignal via options.signal
  • Every callback receives the value as the first argument and the path stack as the second
  • Every StreamHandle is awaitable — await handle resolves when the stream ends
  • All path expressions follow the path syntax spec

Released under the MIT License.