0.0.2 • Published 3 years ago

korvo v0.0.2

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

korvo.js

Latest Release Version

A tiny, self-contained pub-sub implementation.

Created by Taylor DiPentino.


Getting Started

Korvo can be used in both Node and Browser contexts.

Korvo can be added to your project from NPM:

npm install --save korvo

Or, if you really want to, you could add it directly in a script tag:

<script src="https://raw.githubusercontent.com/taylordipentino/korvo/0.0.2/dist/korvo.min.js"></script>

Usage

There are only three public methods:

// Subscribe to a named event with a callback function
korvo.sub('mySuperCoolName', (data) => console.log(data));

// Publish a named event with some data
korvo.pub('mySuperCoolName', 'I am Korvotron.');

// Remove a named event
korvo.remove('mySuperCoolName');

License

Korvo is licensed under the terms of the MIT License.