Skip to content

使用 JS 实现一个 eventEmitter 类 #190

Description

@CongratulateWE

实现一个 eventEmitter 和他的三个 API ——

on(eventName, callback)
emit(eventName, arg)
once(eventName, callback)

参考:
https://juejin.cn/post/6985156199192723487

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions