Skip to content

feat: add possibility to store/retrieve multiple values at the same time #48

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

Conversation

GuillaumeOnepilot
Copy link

Implement #41

I'm really open to discussion because I don't think this feature should be on the same method as set/get since it make the thing confusing, but I tried to follow the chrome API.

@louisgv
Copy link
Contributor

louisgv commented Nov 10, 2023

@GuillaumeOnepilot Thanks for the PR and sorry for the late reply - I've been away for a bit. I don't think we have to worry about following the chrome API. We should make it easy to use and obvious for the API user. IMO, coupling the twos seems weird, but could make sense. Can we also provide a getItems and setItems, and maybe the get and set method would be the one where you can do either?

Would be a slight refactor, but I think it'd make it nicer.

@GuillaumeOnepilot
Copy link
Author

GuillaumeOnepilot commented Nov 10, 2023

@louisgv Thanks for the answer, I agree coupling is following the chrome API, but I find it hard to use and hard to type properly (I did not manage to achieve proper typing of the method depending on the parameters), so I will try to change that as soon as possible.

@GuillaumeOnepilot
Copy link
Author

Hey @louisgv,

Any news ?

@GuillaumeOnepilot
Copy link
Author

@louisgv any updates on this matter?

@sleekslush
Copy link
Contributor

@GuillaumeOnepilot and @louisgv I was thinking about this as well, but approached it in a different way. Biggest difference is I just use the bulk syntax in chrome.storage and browser.storage instead of doing a bunch of async calls for each operation. Let me know your thoughts #51

@louisgv
Copy link
Contributor

louisgv commented Jan 25, 2024

@GuillaumeOnepilot argh I don't check GitHub's inbox notification as often 🙈 Looking now

@louisgv louisgv mentioned this pull request Jan 25, 2024
@louisgv
Copy link
Contributor

louisgv commented Jan 25, 2024

I think #51 likely supersedes this since the array argument works in firefox: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage/StorageArea/get

BTW the best way to get a hold of me is likely Discord. I have GH notification on my phone but it's swarmed by other repos xd.... really sorry @GuillaumeOnepilot for the delay 🙏

@GuillaumeOnepilot
Copy link
Author

@louisgv No issue I will close this one then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants