UNPKG
@flowlab/all
Version:
latest (0.0.2)
0.0.2
0.0.1
A cool library focusing on handling various flows
github.com/countstarss/flowlab
countstarss/flowlab
@flowlab/all
/
packages
/
event
/
src
/
api
/
isEventBound.ts
10 lines
(9 loc)
•
292 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
import
{ getCurrentEventBus }
from
'../internal/context'
;
/** * 判断某个事件是否已绑定处理器 *
@param
eventName 事件名 */
export
function
isEventBound
(
eventName
:
string
):
boolean
{
const
bus
:
any
=
getCurrentEventBus
();
return
bus.
handlers
?.
has
(eventName) ??
false
; }