feat: seperate delta from note storage, improve performance

This commit is contained in:
thecodrr
2020-02-03 23:53:58 +05:00
parent 6d3f3353a8
commit aecfe36fa3
8 changed files with 59 additions and 27 deletions

View File

@@ -1,15 +1,13 @@
import Convert from "../utils/convert";
export default class Storage {
constructor(context) {
this.storage = context;
}
async write(key, data) {
await this.storage.write(key, Convert.toString(data));
await this.storage.write(key, data);
}
async read(key) {
let data = await this.storage.read(key);
return Convert.fromString(data);
return data;
}
clear() {
this.storage.clear();