@global-savings-group/extension-storage
TypeScript icon, indicating that this package has built-in type declarations

0.3.1 • Public • Published

Cross-browser storage service for browser extensions

Usage

import { localStorageService, sessionStorageService } from '@global-savings-group/extension-storage';

setTimeout(async () => {
  const localData = await localStorageService.get('key') ?? 1000;
  await localStorageService.set('key', localData + 1);
  console.log(`Local data: ${localData}`);

  const sessionData = await sessionStorageService.get('key') ?? 2000;
  await sessionStorageService.set('key', sessionData + 1);
  console.log(`Session data: ${sessionData}`);
}, 5000);

Readme

Keywords

none

Package Sidebar

Install

npm i @global-savings-group/extension-storage

Weekly Downloads

51

Version

0.3.1

License

none

Unpacked Size

17.4 kB

Total Files

24

Last publish

Collaborators

  • yuriy_khabarov_gsg
  • gsg_system