Skip to content

Latest commit

 

History

History

source-memory

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

@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