Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(storage-adapter-indexeddb): implement get, put, del
implement initial get, put, del functions #146
- Loading branch information
1 parent
100af1e
commit cee3dc6
Showing
3 changed files
with
192 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,63 @@ | ||
# index | ||
|
||
IndexedDB adapter for spark-core storage layer | ||
|
||
# constructor | ||
|
||
**Parameters** | ||
|
||
- `basekey` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** localforage key under which | ||
all namespaces will be stored | ||
|
||
# bind | ||
|
||
Returns an adapter bound to the specified namespace | ||
|
||
**Parameters** | ||
|
||
- `namespace` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** | ||
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** | ||
|
||
Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Bound](#bound)>** | ||
|
||
# Bound | ||
|
||
localforage binding | ||
|
||
## constructor | ||
|
||
**Parameters** | ||
|
||
- `namespace` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** | ||
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** | ||
|
||
## del | ||
|
||
Removes the specified key | ||
|
||
**Parameters** | ||
|
||
- `key` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** | ||
|
||
Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** | ||
|
||
## get | ||
|
||
Retrieves the data at the specified key | ||
|
||
**Parameters** | ||
|
||
- `key` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** | ||
|
||
Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)<mixed>** | ||
|
||
## put | ||
|
||
Stores the specified value at the specified key | ||
|
||
**Parameters** | ||
|
||
- `key` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** | ||
- `value` **mixed** | ||
|
||
Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters