Name Description Size
Cargo.toml 862
kvstore.jsm This module wraps the nsIKeyValue* interfaces in a Promise-based API. To use it, import it, then call the KeyValueService.getOrCreate() method with a database's path and (optionally) its name: ``` ChromeUtils.import("resource://gre/modules/kvstore.jsm"); let database = await KeyValueService.getOrCreate(path, name); ``` See the documentation in nsIKeyValue.idl for more information about the API for key/value storage. 5964
moz.build 600
nsIKeyValue.idl The nsIKeyValue* interfaces provide a simple, asynchronous API to a key/value storage engine. Basic put/get/has/delete operations are supported, as is enumeration of key/value pairs and the use of multiple named databases within a single storage file. Operations have ACID semantics. This API does not (yet) support transactions, so it will not be appropriate for all use cases. Extension of this API to support transactions is tracked by bug 1499238. The kvstore.jsm module wraps this API in a more idiomatic, Promise-based JS API that supports async/await. In most cases, you're better off using that API from JS rather than using this one directly. Bug 1512319 tracks native support for Promise in Rust-implemented XPCOM methods. 8383
nsKeyValueModule.cpp 951
src 4
test 1