add delete functionality

This commit is contained in:
2017-07-12 17:22:22 +02:00
parent 854dac5732
commit 9883067d8b
2 changed files with 9 additions and 1 deletions

View File

@ -26,6 +26,10 @@ export class KeyValueStore {
plugins.smartfile.fs.toObjectSync(this.filePath),
this.dataObject
)
for (let key in this.deletedObject) {
delete this.dataObject[key]
}
this.deletedObject = {}
await plugins.smartfile.memory.toFs(
JSON.stringify(this.dataObject),
this.filePath