The 'chrome.local.storage' used by the chrome extension works async. with this library you can use it without async. With this package, you do not need to use async when you are going to pull data from storage. Only 1 instance is always kept in the background.
npm install chrome-extension-fast-storage
yarn add chrome-extension-fast-storage
Example usage is as follows.
import ChromeStorage from "chrome-extension-fast-storage";
ChromeStorage.listen((storage) => {
console.log("storage changes", storage);
});
ChromeStorage.set({ timer: 1 });
console.log(ChromeStorage.get("timer"));
console.log(ChromeStorage.getAll());
MIT (c) Abdullah Dalgıç