git ssb

0+

wanderer🌟 / js-dfinity-radix-tree



Commit 9adb001540efa28be5b4533c1a2e9d3c2caa8529

rebuild docs

Signed-off-by: wanderer <mjbecze@gmail.com>
wanderer committed on 10/3/2017, 6:33:15 AM
Parent: 24407d385e0f7cc8eed70abe5a5e927a092ebe60

Files changed

docs/index.mdchanged
package.jsonchanged
docs/index.mdView
@@ -6,25 +6,26 @@
66 - [get](#get)
77 - [set](#set)
88 - [delete](#delete)
99 - [flush](#flush)
10 +- [emptyTreeState](#emptytreestate)
1011 - [ArrayConstructor](#arrayconstructor)
11-- [toTypedArray](#totypedarray)
1212
1313 ## constructor
1414
15-[index.js:20-23](https://github.com/wanderer/merkle-radix-tree/blob/c05ecac437698d9d42b13f01e4931e3d7469affe/index.js#L20-L23 "Source code on GitHub")
15 +[index.js:17-24](https://github.com/wanderer/js-dfinity-radix-tree/blob/24407d385e0f7cc8eed70abe5a5e927a092ebe60/index.js#L17-L24 "Source code on GitHub")
1616
1717 **Parameters**
1818
1919 - `opts`
2020 - `opts.root` {object} a merkle root to a radix tree. If none, RadixTree will create an new root.
21 + - `opts.db` {object} a level db instance alternitly `opts.graph` can be used
2122 - `opts.graph` {object} an instance of [ipld-graph-builder](https://github.com/ipld/js-ipld-graph-builder) alternitvly `opts.dag` can be used
2223 - `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.
2324
2425 ## get
2526
26-[index.js:112-116](https://github.com/wanderer/merkle-radix-tree/blob/c05ecac437698d9d42b13f01e4931e3d7469affe/index.js#L112-L116 "Source code on GitHub")
27 +[index.js:102-106](https://github.com/wanderer/js-dfinity-radix-tree/blob/24407d385e0f7cc8eed70abe5a5e927a092ebe60/index.js#L102-L106 "Source code on GitHub")
2728
2829 gets a value given a key
2930
3031 **Parameters**
@@ -34,9 +35,9 @@
3435 Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)**
3536
3637 ## set
3738
38-[index.js:123-166](https://github.com/wanderer/merkle-radix-tree/blob/c05ecac437698d9d42b13f01e4931e3d7469affe/index.js#L123-L166 "Source code on GitHub")
39 +[index.js:113-149](https://github.com/wanderer/js-dfinity-radix-tree/blob/24407d385e0f7cc8eed70abe5a5e927a092ebe60/index.js#L113-L149 "Source code on GitHub")
3940
4041 stores a value at a given key
4142
4243 **Parameters**
@@ -47,9 +48,9 @@
4748 Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)**
4849
4950 ## delete
5051
51-[index.js:173-224](https://github.com/wanderer/merkle-radix-tree/blob/c05ecac437698d9d42b13f01e4931e3d7469affe/index.js#L173-L224 "Source code on GitHub")
52 +[index.js:156-208](https://github.com/wanderer/js-dfinity-radix-tree/blob/24407d385e0f7cc8eed70abe5a5e927a092ebe60/index.js#L156-L208 "Source code on GitHub")
5253
5354 deletes a value at a given key
5455
5556 **Parameters**
@@ -59,29 +60,23 @@
5960 Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)**
6061
6162 ## flush
6263
63-[index.js:230-232](https://github.com/wanderer/merkle-radix-tree/blob/c05ecac437698d9d42b13f01e4931e3d7469affe/index.js#L230-L232 "Source code on GitHub")
64 +[index.js:214-216](https://github.com/wanderer/js-dfinity-radix-tree/blob/24407d385e0f7cc8eed70abe5a5e927a092ebe60/index.js#L214-L216 "Source code on GitHub")
6465
6566 creates a merkle root for the current tree and stores the data perstantly
6667
6768 Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)**
6869
70 +## emptyTreeState
71 +
72 +[index.js:29-31](https://github.com/wanderer/js-dfinity-radix-tree/blob/24407d385e0f7cc8eed70abe5a5e927a092ebe60/index.js#L29-L31 "Source code on GitHub")
73 +
74 +returns the state of an empty tree
75 +
6976 ## ArrayConstructor
7077
71-[index.js:29-31](https://github.com/wanderer/merkle-radix-tree/blob/c05ecac437698d9d42b13f01e4931e3d7469affe/index.js#L29-L31 "Source code on GitHub")
78 +[index.js:37-39](https://github.com/wanderer/js-dfinity-radix-tree/blob/24407d385e0f7cc8eed70abe5a5e927a092ebe60/index.js#L37-L39 "Source code on GitHub")
7279
7380 returns an Uint1Array constructir which is used to repersent keys
7481
7582 Returns **[object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)**
76-
77-## toTypedArray
78-
79-[index.js:38-40](https://github.com/wanderer/merkle-radix-tree/blob/c05ecac437698d9d42b13f01e4931e3d7469affe/index.js#L38-L40 "Source code on GitHub")
80-
81-converts a TypedArray or Buffer to an Uint1Array
82-
83-**Parameters**
84-
85-- `array` **[TypedArray](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray)** the array to convert
86-
87-Returns **[TypedArray](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray)**
package.jsonView
@@ -3,10 +3,10 @@
33 "version": "0.0.5",
44 "description": "This implements a binary merkle radix tree",
55 "main": "index.js",
66 "scripts": {
7- "coverage": "node ./node_modules/istanbul/lib/cli.js cover ./tests/index.js",
8- "coveralls": "npm run coverage && coveralls <coverage/lcov.info",
7 + "coveralls": "npm run coverage && nyc report --reporter=text-lcov | coveralls",
8 + "coverage": "nyc npm test",
99 "lint": "standard",
1010 "test": "node ./tests/index.js",
1111 "build:docs": "documentation build ./index.js --github --sort-order source -f md > ./docs/index.md"
1212 },
@@ -17,20 +17,17 @@
1717 "tree",
1818 "ipfs"
1919 ],
2020 "devDependencies": {
21- "coveralls": "^2.13.1",
2221 "documentation": "^5.1.1",
2322 "level": "^1.7.0",
2423 "nyc": "^11.2.1",
2524 "standard": "^10.0.0",
2625 "tape": "^4.6.3"
2726 },
2827 "dependencies": {
29- "blakejs": "^1.1.0",
30- "ipld-graph-builder": "^1.2.4",
28 + "ipld-graph-builder": "^1.3.3",
3129 "leb128": "0.0.2",
32- "node-webcrypto-ossl": "^1.0.31",
3330 "node-webcrypto-shim": "0.0.0",
3431 "safe-buffer": "^5.1.1",
3532 "text-encoding": "^0.6.4",
3633 "uint1array": "^1.0.5"

Built with git-ssb-web