Commit 679937360074d0e31e59880b76fbfa01da58efd3
rebuild docs
Signed-off-by: wanderer <mjbecze@gmail.com>wanderer committed on 12/2/2017, 6:34:40 AM
Parent: f9661bdacce6cf38306dfab66da860f6e2e9c4be
Files changed
docs/index.md | changed |
docs/index.md | ||
---|---|---|
@@ -2,19 +2,21 @@ | ||
2 | 2 … | |
3 | 3 … | ### Table of Contents |
4 | 4 … | |
5 | 5 … | - [constructor](#constructor) |
6 … | +- [getSubTree](#getsubtree) | |
6 | 7 … | - [get](#get) |
7 | 8 … | - [set](#set) |
8 | 9 … | - [delete](#delete) |
10 … | +- [done](#done) | |
9 | 11 … | - [flush](#flush) |
10 | 12 … | - [emptyTreeState](#emptytreestate) |
11 | 13 … | - [ArrayConstructor](#arrayconstructor) |
12 | 14 … | - [getMerkleLink](#getmerklelink) |
13 | 15 … | |
14 | 16 … | ## constructor |
15 | 17 … | |
16 | -[index.js:18-26](https://github.com/dfinity/js-dfinity-radix-tree/blob/ca8952130fa954fc6fad3847bdd48dd40fc3228f/index.js#L18-L26 "Source code on GitHub") | |
18 … | +[index.js:17-26](https://github.com/dfinity/js-dfinity-radix-tree/blob/f9661bdacce6cf38306dfab66da860f6e2e9c4be/index.js#L17-L26 "Source code on GitHub") | |
17 | 19 … | |
18 | 20 … | **Parameters** |
19 | 21 … | |
20 | 22 … | - `opts` |
@@ -22,15 +24,26 @@ | ||
22 | 24 … | - `opts.db` {object} a level db instance alternitly `opts.graph` can be used |
23 | 25 … | - `opts.graph` {object} an instance of [ipld-graph-builder](https://github.com/ipld/js-ipld-graph-builder) alternitvly `opts.dag` can be used |
24 | 26 … | - `opts.dag` {object} an instance if [ipfs.dag](https://github.com/ipfs/js-ipfs#dag). If there is no `opts.graph` this will be used to create a new graph instance. |
25 | 27 … | |
28 … | +## getSubTree | |
29 … | + | |
30 … | +[index.js:33-38](https://github.com/dfinity/js-dfinity-radix-tree/blob/f9661bdacce6cf38306dfab66da860f6e2e9c4be/index.js#L33-L38 "Source code on GitHub") | |
31 … | + | |
32 … | +creates a new instance of RadixTree that is the subTree of the given key | |
33 … | + | |
34 … | +**Parameters** | |
35 … | + | |
36 … | +- `key` **any** | |
37 … | +- `decode` | |
38 … | + | |
39 … | +Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** resolve to the new instance of RadixTree | |
40 … | + | |
26 | 41 … | ## get |
27 | 42 … | |
28 | -[index.js:133-142](https://github.com/dfinity/js-dfinity-radix-tree/blob/ca8952130fa954fc6fad3847bdd48dd40fc3228f/index.js#L133-L142 "Source code on GitHub") | |
43 … | +[index.js:45-50](https://github.com/dfinity/js-dfinity-radix-tree/blob/f9661bdacce6cf38306dfab66da860f6e2e9c4be/index.js#L45-L50 "Source code on GitHub") | |
29 | 44 … | |
30 | -gets a value given a key. The promise resolves with an object containing | |
31 | -`node` the node in the merkle tree and `value` the value of the that the | |
32 | -node contains | |
45 … | +gets a value given a key | |
33 | 46 … | |
34 | 47 … | **Parameters** |
35 | 48 … | |
36 | 49 … | - `key` **any** |
@@ -39,9 +52,9 @@ | ||
39 | 52 … | Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** |
40 | 53 … | |
41 | 54 … | ## set |
42 | 55 … | |
43 | -[index.js:149-151](https://github.com/dfinity/js-dfinity-radix-tree/blob/ca8952130fa954fc6fad3847bdd48dd40fc3228f/index.js#L149-L151 "Source code on GitHub") | |
56 … | +[index.js:113-116](https://github.com/dfinity/js-dfinity-radix-tree/blob/f9661bdacce6cf38306dfab66da860f6e2e9c4be/index.js#L113-L116 "Source code on GitHub") | |
44 | 57 … | |
45 | 58 … | stores a value at a given key |
46 | 59 … | |
47 | 60 … | **Parameters** |
@@ -52,9 +65,9 @@ | ||
52 | 65 … | Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** |
53 | 66 … | |
54 | 67 … | ## delete |
55 | 68 … | |
56 | -[index.js:198-200](https://github.com/dfinity/js-dfinity-radix-tree/blob/ca8952130fa954fc6fad3847bdd48dd40fc3228f/index.js#L198-L200 "Source code on GitHub") | |
69 … | +[index.js:161-164](https://github.com/dfinity/js-dfinity-radix-tree/blob/f9661bdacce6cf38306dfab66da860f6e2e9c4be/index.js#L161-L164 "Source code on GitHub") | |
57 | 70 … | |
58 | 71 … | deletes a value at a given key |
59 | 72 … | |
60 | 73 … | **Parameters** |
@@ -62,33 +75,41 @@ | ||
62 | 75 … | - `key` **any** |
63 | 76 … | |
64 | 77 … | Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** |
65 | 78 … | |
79 … | +## done | |
80 … | + | |
81 … | +[index.js:223-229](https://github.com/dfinity/js-dfinity-radix-tree/blob/f9661bdacce6cf38306dfab66da860f6e2e9c4be/index.js#L223-L229 "Source code on GitHub") | |
82 … | + | |
83 … | +returns a promise that resolve when the tree is done with all of its writes | |
84 … | + | |
85 … | +Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** | |
86 … | + | |
66 | 87 … | ## flush |
67 | 88 … | |
68 | -[index.js:260-263](https://github.com/dfinity/js-dfinity-radix-tree/blob/ca8952130fa954fc6fad3847bdd48dd40fc3228f/index.js#L260-L263 "Source code on GitHub") | |
89 … | +[index.js:245-248](https://github.com/dfinity/js-dfinity-radix-tree/blob/f9661bdacce6cf38306dfab66da860f6e2e9c4be/index.js#L245-L248 "Source code on GitHub") | |
69 | 90 … | |
70 | 91 … | creates a merkle root for the current tree and stores the data perstantly |
71 | 92 … | |
72 | 93 … | Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** |
73 | 94 … | |
74 | 95 … | ## emptyTreeState |
75 | 96 … | |
76 | -[index.js:49-51](https://github.com/dfinity/js-dfinity-radix-tree/blob/ca8952130fa954fc6fad3847bdd48dd40fc3228f/index.js#L49-L51 "Source code on GitHub") | |
97 … | +[index.js:278-280](https://github.com/dfinity/js-dfinity-radix-tree/blob/f9661bdacce6cf38306dfab66da860f6e2e9c4be/index.js#L278-L280 "Source code on GitHub") | |
77 | 98 … | |
78 | 99 … | returns the state of an empty tree |
79 | 100 … | |
80 | 101 … | ## ArrayConstructor |
81 | 102 … | |
82 | -[index.js:57-59](https://github.com/dfinity/js-dfinity-radix-tree/blob/ca8952130fa954fc6fad3847bdd48dd40fc3228f/index.js#L57-L59 "Source code on GitHub") | |
103 … | +[index.js:286-288](https://github.com/dfinity/js-dfinity-radix-tree/blob/f9661bdacce6cf38306dfab66da860f6e2e9c4be/index.js#L286-L288 "Source code on GitHub") | |
83 | 104 … | |
84 | 105 … | returns an Uint1Array constructir which is used to repersent keys |
85 | 106 … | |
86 | 107 … | Returns **[object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** |
87 | 108 … | |
88 | 109 … | ## getMerkleLink |
89 | 110 … | |
90 | -[index.js:66-68](https://github.com/dfinity/js-dfinity-radix-tree/blob/ca8952130fa954fc6fad3847bdd48dd40fc3228f/index.js#L66-L68 "Source code on GitHub") | |
111 … | +[index.js:295-297](https://github.com/dfinity/js-dfinity-radix-tree/blob/f9661bdacce6cf38306dfab66da860f6e2e9c4be/index.js#L295-L297 "Source code on GitHub") | |
91 | 112 … | |
92 | 113 … | returns a merkle link for some given data |
93 | 114 … | |
94 | 115 … | **Parameters** |
Built with git-ssb-web