Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 979 Bytes

README.md

File metadata and controls

31 lines (21 loc) · 979 Bytes

@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