@chunkd/source-memory
TypeScript icon, indicating that this package has built-in type declarations

11.0.2 • Public • Published

@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

Readme

Keywords

none

Package Sidebar

Install

npm i @chunkd/source-memory

Weekly Downloads

92

Version

11.0.2

License

MIT

Unpacked Size

11.7 kB

Total Files

10

Last publish

Collaborators

  • blacha