Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

ipld/ipld-in-memory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project is no longer under active development and has been archived.

ipld-in-memory

Build Status dependencies Status JavaScript Style Guide

IPLD in your RAM

This is the util to create an in memory IPLD instance that the ipld module used to export but as a separate module.

Install

npm install ipld-in-memory

Usage

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!

Contribute

Feel free to dive in! Open an issue or submit PRs.

License

MIT © Protocol Labs, Inc.