Skip to content

Restrictions for the event name #9

@agudulin

Description

@agudulin

This code will produce an exception:

const mitt = require("mitt")

const emitter = mitt()

emitter.on('constructor', e => console.log(1))
emitter.emit('constructor', {})

You may want to filter all those native methods out, or use a different approach of collecting the events.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions