emmit

阅读时长 2 分钟读完

It is a small library for the management of events

Emmit

It is a small library for the management of events, this is based on the library mitt, but it is built according to a class.

Instance

Emmitt operates like any event manager

-- -------------------- ---- -------
------ ----- ---- --------

--- ------ - --- ------

--- --------------- - ------------------------------
   -- -------- ----- ----
--

--- -------------- - ---------------------------
   -- -------- --- -----
--

-----------------------

as you will notice every time you store an event emmit returns an unsubscribe for the stored event.

Subscribers in the instance

You can define an object that already stores events from the instance of emmit

HomePage

https://github.com/UpperCod/emmit#readme

Repository

git+https://github.com/UpperCod/emmit.git

来源:JavaScript中文网 ,转载请注明来源 https://www.javascriptcn.com/post/600572cd81e8991b448e9003

纠错
反馈