Skip to content

Reset database #27

@puckey

Description

@puckey

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:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions