0.5.1 • Published 2 years ago

ntnu-notifier v0.5.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

NTNU Notifier

National Taiwan Normal University (NTNU) Notifier.

NPM

Install

npm i ntnu-notifier

Usage

import { CsieNotifier, Covid19Notifier } from "ntnu-notifier";

const notifier1 = new CsieNotifier();
const notifier2 = new Covid19Notifier();

notifier1.on("notify", async (notifier, news) => {
    console.log(notifier, news);
});

notifier2.on("notify", async (notifier, news) => {
    console.log(notifier, news);
});

notifier1.start();
notifier2.start();

Multiple Listeners

Listener hooks are chainable.

import { CsieNotifier } from "ntnu-notifier";
const notifier = new CsieNotifier();

notifier
    .on("notify", async (notifier, news) => {
        console.log("Listener 1", news);
    })
    .on("notify", async (notifier, news) => {
        console.log("Listener 2", news);
    });

notifier.start();

More Details: Documentation.

Availible Notifiers

  • CSIE Notifier (CsieNotifier)
  • COVID19 Notifier (Covid19Notifier)
  • Academic Affairs Notifier (AaNotifier)

Links

0.5.0

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.5.1

2 years ago

0.3.3

3 years ago

0.3.2

3 years ago

0.3.1

3 years ago

0.3.0

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.0

3 years ago