gruns / gruns/ImmortalDB

Reset database

Open
#27 4 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
3.1k
Forks
60
PR merge metrics
No merged PRs in 30d

Description

For testing purposes, I need to reset the values set by ImmortalDB. Currently I am doing the following to achieve this, but it would be great if the library offered this functionality:

```javascript
const clearStorage = () => Promise.all(
Object.keys(localStorage)
.filter(key => key.startsWith('_immortal'))
.map(key => ImmortalDB.remove(key.replace('_immortal|', '')))
);
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.