Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Latest commit

 

History

History
148 lines (86 loc) · 3.79 KB

index.md

File metadata and controls

148 lines (86 loc) · 3.79 KB

Table of Contents

constructor

index.js:24-31

Parameters

findUnsavedLeafNodes

index.js:54-67

given a node on the graph this returns all the leaf node that have not yet been saved

Parameters

Returns Array

set

index.js:77-103

sets a value on a root object given its path

Parameters

  • node Object
  • path String
  • value any
  • noLink boolean if true, value is added as a plain object instead of a link

Returns Promise

get

index.js:113-117

traverses an object's path and returns the resulting value in a Promise

Parameters

  • node Object
  • path String
  • dropOptions boolean whether to add the encoding options of the nodes when loading from IPFS. Defaults to true

Returns Promise

tree

index.js:161-180

Resolves all the links in an object and does so recusivly for N level

Parameters

  • node Object
  • levels Integer (optional, default 1)
  • dropOptions boolean whether to add the encoding options of the nodes when loading from IPFS. Defaults to true

Returns Promise

flush

index.js:203-214

flush an object to ipfs returning the resulting CID in a promise

Parameters

  • node Object
  • opts Object encoding options for dag.put (optional, default {})
    • opts.onHash Function a callback that happens on each merklized node. It is given two arguments hash and node which is the node that was hashed

Returns Promise