tiny-signal
tiny-signal is a minimal implementation of the observer design pattern in only 228 bytes gzipped.
Installation
npm i tiny-signal
Usage
const instance = const foo = consoleconst bar = consoleconst baz = console instanceinstanceinstance instance// foo! hello world!// bar! hello world!// baz! hello world! instanceinstance// foo! howdy!// baz! howdy! instance // removes all listeners