Read files in Node.js or fetch URLs in browsers as standard WhatWG readable streams. Version 0.1.3 provides a unified API for streaming file I/O and HTTP responses. Designed for incremental data processing, it returns a ReadableStream reader with `read()` and `cancel()` methods. In Node, it wraps file streams; in browsers, it uses the Fetch API with streaming support when available, falling back to XMLHttpRequest. Lightweight and zero-dependency for the core feature, but requires `array-source` in older browsers. Part of a family of stream sources by Mike Bostock.
npm install path-sourceNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Reads a file as a stream and writes chunks to stdout. Demonstrates async iteration and proper cleanup.
Ensure array-source is loaded when using in older browsers (or use polyfills).
Treat value consistently as a Uint8Array; use TextDecoder if you need string output.
Use `import path from 'path-source'` or `const path = require('path-source')`Ensure you are calling path() which returns a promise resolving to a source object with .read() method.
No dependency data recorded yet.