Mitt was made for the browser, but works in any JavaScript runtime. It has no dependencies and supports IE9+. This project uses node and npm. Go check them out if you don't have them locally installed. Then with a module bundler like rollup or webpack, use as you would anything else. The UMD build is also available on unpkg. Set "strict": true in your tsconfig.json to get improved type inference for mitt instance methods. Alternatively, you can use the provided Emitter type. Remove an event handler for the given type. If handler is omitted, all handlers of the given type are removed. Invoke all handlers for the given type. If present, '*' handlers are invoked after type-matched handlers.
Features
- Weighs less than 200 bytes gzipped
- Provides a wildcard event type listens to all events
- Same names & ideas as Node's EventEmitter
- Methods don't rely on this
- Mitt was made for the browser
- works in any JavaScript runtime
Categories
Browser Extensions and PluginsLicense
MIT LicenseFollow Mitt
Other Useful Business Software
Our Free Plans just got better! | Auth0
You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your security. Auth0 now, thank yourself later.
Rate This Project
Login To Rate This Project
User Reviews
Be the first to post a review of Mitt!