chrome-extension-fast-storage
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

chrome-extension-fast-storage

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.

Install

npm install chrome-extension-fast-storage
yarn add chrome-extension-fast-storage

Usage

Example usage is as follows.

To call the package

import ChromeStorage from "chrome-extension-fast-storage";

To listen to the changes on the storage

ChromeStorage.listen((storage) => {
  console.log("storage changes", storage);
});

To save a data on storage

ChromeStorage.set({ timer: 1 });

To read data from storage

console.log(ChromeStorage.get("timer"));

To read all data on the storage

console.log(ChromeStorage.getAll());

License

MIT (c) Abdullah Dalgıç

Package Sidebar

Install

npm i chrome-extension-fast-storage

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

10.5 kB

Total Files

5

Last publish

Collaborators

  • abdullahdalgic