aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
8 daysMerge tag '3.0.1' from mittHEADmasterMarin Ivanov
2023-07-04apply prettier formatting to all filesJason Miller
2022-01-31Clarify what `off('*')` doesJason Miller
Fixes #150
2021-06-22Add support for mitt.off("type"), which removes all handlers of a given typeJason Miller
2021-06-22Merge branch 'master' into patch_123Jason Miller
2021-06-22Merge branch 'cheaper' of https://github.com/sealice/mitt into sealice-cheaperJason Miller
2021-06-22Stronger typing (#114)iyegoroff
* improved typing * upd readme * upd readme * upd test & readme * removed magic 1 * removed ts-toolbelt dependency
2021-01-21compression codesealice
2021-01-11Fix the format and update the off APIsealice
2021-01-04Add new features of emitter.off. Fixes #123sealice
If emitter.off provides only the event, remove all listeners for that event.
2020-07-15Merge branch 'expose-all' of https://github.com/jaylinski/mittJason Miller
2020-07-15Add generic types and update tests (#107)Jack Franklin
* Add generic types and update tests * Add generic types to `on`, `off` and `emit` to enable some nicer TS usage if you specify what type you're expecting from the `EventData`. * Move the tests to be TypeScript source. This will help catch errors in the tests if there are any type errors. * Create a new test to test the generic types and make sure they pass and error when expected. * Upgrade to Mocha 8. * Did some tidying up of the package.json scripts. * Tweak TS setup to validate tests * Fix d.ts generation and tests Co-authored-by: Jason Miller <[email protected]>
2020-07-13Merge branch 'master' into expose-allJason Miller
2020-07-09Add missing space (#103)Jay Linski
Co-authored-by: Jason Miller <[email protected]>
2020-06-03Expose `all` propertyJakob Linskeseder
Relates to #70 #72 #102
2020-05-27Export Mitt types for TS consumers (#101)Jack Franklin
* Export Mitt types for TS consumers * Add rudimentary tests for exported TS types * Run tests against the generated output instead of src
2020-05-27Use eslint-config-developitJason Miller
2020-05-27cache map.get() for size wins (#100)Jason Miller
* cache map.get() for size wins * Further reduce size of on()
2020-05-26Migrate to TypeScript and use Map (#99)Jack Franklin
Migrate to TypeScript & Microbundle, move to Map for event handler storage
2020-02-21Add note about manually firing "*" handlersJason Miller
2019-04-27Fix TypeScript warning and add caveats to ToCMarin Ivanov
2019-04-27Version 1.0.2Marin Ivanov
Add a repository link to the package.json file. Improve the usage documentation and add ceveats section about once/when. Add a test to ensure the current behaviour of once() and off().
2019-04-26Bump verstion to 1.0.1Marin Ivanov
Add acknowledgments to the readme
2019-04-26Rename {mitt => nitt}Marin Ivanov
2017-12-06Fixes #65 - handler removal during handler invocation (`.off()` during ↵Jason Miller
`.emit()`).
2017-08-14Fixing API documentation header (#62)Brian Wendt
* Fixing API documentation header * Updating documentjs comment
2017-07-05more precise type annotation for WildCardEventHandler (#58)Tung Vu
* more precise type annotation for WildCardEventHandler * fix: remove duplicated @flow * fix: make * optional
2017-06-07Fix `emit` and `EventHandler` type annotations (#47)Rūdolfs Vikmanis
2017-04-14Avoid creating a new listener type array in `off()`, saves another 4 bytes ↵Jason Miller
(187b -> 183b)
2017-04-14Fix eslint complaintsJason Miller
2017-04-13Change description for emit (fix #49) (#50)Denis Sikuler
2017-03-10Fix `emit` argument annotation (#45)Rūdolfs Vikmanis
2017-03-09Removed outdated (untrue) API docs - chaining was removed in 53a44d8 (#44)Mateusz Burzyński
2017-02-27Add Flow type annotations (#23)Brandon Dail
* Add flowtype annotations * Add flow to test script
2017-02-25Remove chaining return values so we don't make #1 impossible (yet?)Jason Miller
2017-02-25Let's keep `all` as an argument for now to avoid a semver breaking changeJason Miller
2017-01-18remove "drop support for emitting multiple args" thing as per ↵tunnckoCore
https://github.com/developit/mitt/pull/19#issuecomment-273344689
2017-01-17fix: switch Set with array; update tests; drop toLowerCase()tunnckoCore
2017-01-17add editorconfig, fix original identationtunnckoCore
2017-01-17refactor: fixes #2, #6, #12 and #13tunnckoCore
2017-01-14Initial commit! 🚀Jason Miller