@creately/lschannel-es6
    TypeScript icon, indicating that this package has built-in type declarations

    2.0.3 • Public • Published

    lschannel

    Send and receive messages across multiple tabs and windows. LocalStorage channels extend the RxJS subject to provide an api which will work well with applications which use Observables. To get started, first install the module with npm.

    npm install @creately/lschannel

    When creating a channel, provide a unique key to identify the channel. The key will be the key on localStorage data will be stored on.

    import { Channel } from '@creately/lschannel';
     
    // create a channel
    const ch = Channel.create<number>('unique-key');
     
    // subscribe to data
    ch.subscribe((n: number) => {
      console.log('received', n)
    });
     
    // on a different tab
    ch.next(1);
    ch.next(2);
    ch.next(3);

    Install

    npm i @creately/lschannel-es6

    DownloadsWeekly Downloads

    2

    Version

    2.0.3

    License

    MIT

    Unpacked Size

    7.82 kB

    Total Files

    6

    Last publish

    Collaborators

    • damithcgx
    • linatrefai
    • sajeeva
    • rumaizcinergix
    • thisunravisara
    • nuwacgx
    • jziegelaar
    • chandika
    • vinochs
    • shashik_thiwanka
    • sasindu