perf: add readMulti for reading multiple keys

This commit is contained in:
thecodrr
2020-03-09 00:12:40 +05:00
parent cff0bef0b7
commit a88552cea3
2 changed files with 13 additions and 12 deletions

View File

@@ -2,18 +2,20 @@ export default class Storage {
constructor(context) {
this.storage = context;
}
async write(key, data) {
await this.storage.write(key, data);
write(key, data) {
return this.storage.write(key, data);
}
async read(key) {
let data = await this.storage.read(key);
return data;
readMulti(keys) {
return this.storage.readMulti(keys);
}
async clear() {
await this.storage.clear();
read(key) {
return this.storage.read(key);
}
async remove(key) {
await this.storage.remove(key);
clear() {
return this.storage.clear();
}
remove(key) {
return this.storage.remove(key);
}
encrypt(password, data) {
return this.storage.encrypt(password, data);