Skip to content
/ event Public
generated from wopjs/template

An event that can be subscribed to.

License

Notifications You must be signed in to change notification settings

wopjs/event

Repository files navigation

@wopjs/event

Docs Build Status npm-version Coverage Status minified-size

A tiny utility to create an event that can be subscribed to.

Install

npm add @wopjs/event

Usage

import { event, send } from "@wopjs/event";

const onDidChange = event<string>();
const dispose = onDidChange(data => console.log(data));

send(onDidChange, "data"); // logs "data"
dispose();

License

MIT @ wopjs