@chunkd/source-memory
v11.0.2
Published
this is designed for unit tests to prevent file system access, and not recommended for large file workloads.
Downloads
279
Readme
@chunkd/source-memory
this is designed for unit tests to prevent file system access, and not recommended for large file workloads.
Usage
import { SourceMemory } from '@chunkd/source-memory';
const source = new SourceMemory(new URL('memory://foo/bar.json', JSON.stringify({ hello: 'world' })));
JSON.parse(await source.fetch()); // { hello: "world" }
Advanced Usage
For caching, block alignment and fetch grouping see @chunkd/middleware and @chunkd/fs