localstorage-queue
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

LocalStorage Queue

Queue(FIFO) implementation using LocalStorage API

Install

$ yarn add localstorage-queue

Usage

import { LocalStorageQueue } from "localstorage-queue";

const queue = new LocalStorageQueue({
  key: "something",
});

// Issue an event
queue.emit("hello", { world: true });

// Register a listener
queue.on("hello", (data) => {
  console.log(data);
});

// listening...
queue.listen();

Readme

Keywords

none

Package Sidebar

Install

npm i localstorage-queue

Weekly Downloads

1

Version

0.1.1

License

MIT

Unpacked Size

8.94 kB

Total Files

5

Last publish

Collaborators

  • tonyfromundefined