ipld-in-memory
Version:
IPLD in your RAM
38 lines (24 loc) • 1.3 kB
Markdown
[](https://travis-ci.org/ipld/ipld-in-memory) [](https://david-dm.org/ipld/ipld-in-memory) [](https://standardjs.com)
> IPLD in your RAM
This is the [util to create an in memory IPLD instance that the `ipld` module used to export](https://github.com/ipld/js-ipld/blob/f7494ec7b7a52a34d33d8ec308718b31919e08b6/src/index.js#L435-L455) but as a separate module.
```sh
npm install ipld-in-memory
```
```js
const IPLD = require('ipld')
const inMemory = require('ipld-in-memory')
// options object to be passed to the IPLD constructor -
// this module sets the 'blockService' property in the options object
// so any passed value for that key will be ignored
const ipldOpts = {}
const ipld = await inMemory(IPLD, ipldOpts)
// ipld is an instance of IPLD (https://www.npmjs.com/package/ipld) configured
// to use an in memory repo for storage!
```
Feel free to dive in! [Open an issue](https://github.com/ipld/ipld-in-memory/issues/new) or submit PRs.
[](LICENSE) © Protocol Labs, Inc.