mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-22 22:49:45 +01:00
feat: seperate delta from note storage, improve performance
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user