Browse Source

update README

Kieran Gibb 1 year ago
parent
commit
59b8f4901c
No known key found for this signature in database
1 changed files with 5 additions and 9 deletions
  1. 5
    9
      README.md

+ 5
- 9
README.md View File

@@ -6,10 +6,9 @@ Stores and retrieves a YAML configuration file for use with the cobox stack. Als
6 6
 
7 7
 ```js
8 8
 const Config = require('cobox-config')
9
-const crypto = require('cobox-crypto')() // or some other crypto scheme
9
+const storage = './storage'
10 10
 
11
-var storage = './storage'
12
-var config = Config(storage)
11
+const config = Config(storage)
13 12
 ```
14 13
 
15 14
 ## API
@@ -28,21 +27,21 @@ Load from YAML, path set using the storage path when initialising. This is calle
28 27
 
29 28
 ```
30 29
 var key = group.name || group.address || group.address.toString('hex')
31
-config.groups.get(group)
30
+config.groups.get(key)
32 31
 ```
33 32
 
34 33
 Get a group from the config
35 34
 
36 35
 ```
37 36
 var key = group.name || group.address || group.address.toString('hex')
38
-config.groups.set(group, { name, address, encryptionKey })
37
+config.groups.set(key, { name, address, encryptionKey })
39 38
 ```
40 39
 
41 40
 Add a group to the config
42 41
 
43 42
 ```
44 43
 var key = group.name || group.address || group.address.toString('hex')
45
-config.groups.delete(group)
44
+config.groups.delete(key)
46 45
 ```
47 46
 
48 47
 Remove a group from the config
@@ -52,6 +51,3 @@ config.groups.list()
52 51
 ```
53 52
 
54 53
 List saved groups
55
-
56
-## Future Features
57
-* Store names against ID's in YAML config file for multiple identity capability