LevelStorage stores data to a Level-compatible database.
To learn more about Level, see https://github.com/Level/level.
- Source:
Methods
(async) clear()
Clears the contents of the Level db.
- Source:
(async) close()
Closes the Level db.
- Source:
(async) del(hash, data)
Deletes data from Level.
Parameters:
Name | Type | Description |
---|---|---|
hash |
string | The hash of the data to delete. |
data |
* | The data to store. |
- Source:
(async) get(hash)
Gets data from Level.
Parameters:
Name | Type | Description |
---|---|---|
hash |
string | The hash of the data to get. |
- Source:
(async, generator) iterator()
Iterates over records stored in Level.
- Source:
Yields:
[string, string] The next key/value pair from Level.
(async) put(hash, data)
Puts data to Level.
Parameters:
Name | Type | Description |
---|---|---|
hash |
string | The hash of the data to put. |
data |
* | The data to store. |
- Source: