Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Base ignored with getKeys in local storage and session storage #352

Open
ManUtopiK opened this issue Dec 9, 2023 · 0 comments
Open

Base ignored with getKeys in local storage and session storage #352

ManUtopiK opened this issue Dec 9, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@ManUtopiK
Copy link

ManUtopiK commented Dec 9, 2023

Environment

v1.10.1

Reproduction

import { createStorage } from "unstorage";
import localStorageDriver from "unstorage/drivers/localstorage";

const storage = createStorage({
  driver: localStorageDriver({ base: "app:" }),
});

console.log(storage.getKeys()) // return all the items of the localstorage

Describe the bug

When localstorage is mounted with a base, the returned keys should be only the keys starting from the base.

Additional context

No response

Logs

No response

@pi0 pi0 added the bug Something isn't working label May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants