random-access-memory-overlay

Random Access Storage instance that stores mutations in a memory overlay instead of writing them to the underlying storage

MIT 4 个版本
安装
npm install random-access-memory-overlay
yarn add random-access-memory-overlay
pnpm add random-access-memory-overlay
bun add random-access-memory-overlay
README

random-access-memory-overlay

Random Access Storage instance that stores mutations in a memory overlay instead of writing them to the underlying storage.

npm install random-access-memory-overlay

Useful for fixtures etc.

Usage

const RAO = require('random-access-memory-overlay')

// make some storage instance
const file = new RandomAccessFile('./my-file')

// make an overlay
const overlay = new RAO(file)

// any mutations done to overlay (ie write, del) are just tracked in memory
// any reads go through the overlay and then the underlying storage

License

MIT

版本列表
3.0.0 2022-09-14
2.0.1 2022-07-13
2.0.0 2022-07-13
1.0.0 2022-03-24