@ciebit/hermes

Provide event-like structure for communication between objects

Usage no npm install needed!

<script type="module">
  import ciebitHermes from 'https://cdn.skypack.dev/@ciebit/hermes';
</script>

README

@ciebit/hermes

Provide event-like structure for communication between objects

Use

import Hermes from "@ciebit/hermes";

const hermes = new Hermes;

hermes.addListener('active', (text:string) => console.log(text));
hermes.dispache('active', 'Activated');


// For a single call to pass true in the third parameter
hermes.addListener('unique', () => console.log('Unique'), true)