Skip to content
Myr

cleanup

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by tunnckoCore · committed by tunnckoCore · parent 0c8202b · Browse files · 4 files+0 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

4 files+0 added−6 removed

  • other:+0 added−6 removed

4 files+0 added−6 removed

deleted:dist-using-set/mitt.js-2 removed
deleted:dist-using-set/mitt.js.map-1 removed
1{"version":3,"sources":["../src/index.js"],"names":["mitt","let","ret","all","Object","create","on","type","handler","list","add","off","delete","emit","arg1","arg2","arg3","forEach","toLowerCase","Set"],"mappings":"AAIA,QAAwBA,KACvBC,GAAIC,IACHC,IAAKC,OAAOC,OAAO,MAUnBC,GAAE,SAACC,EAAMC,GAER,MADAC,GAAKF,GAAMG,IAAIF,GACRN,GAWRS,IAAG,SAACJ,EAAMC,GAET,MADAC,GAAKF,GAAMK,OAAOJ,GACXN,GAcRW,KAAI,SAACN,EAAMO,EAAMC,EAAMC,GAGtB,MAFAP,GAAKF,GAAMU,QAAQ,SAACT,GAAS,MAAGA,GAAQM,EAAMC,EAAMC,KACpDP,EAAK,KAAKQ,QAAQ,SAACT,GAAS,MAAGA,GAAQD,EAAMO,EAAMC,EAAMC,KAClDd,IAKLO,EAAO,SAACF,GACX,MAAOL,GAAIC,IAAII,EAAOA,EAAKW,iBAAmBhB,EAAIC,IAAII,GAAQ,GAAIY,MAGnE,OAAOjB","file":"mitt.js","sourcesContent":["/** Mitt: Tiny (~200b) functional event emitter / pubsub.\n * @name mitt\n * @returns {Mitt}\n */\nexport default function mitt () {\n\tlet ret = {\n\t\tall: Object.create(null),\n\n\t\t/**\n\t\t * Register an event handler for the given type.\n\t\t *\n\t\t * @param {String} type Type of event to listen for, or `\"*\"` for all events\n\t\t * @param {Function} handler Function to call in response to given event\n\t\t * @return {Object} the `mitt` instance for chaining\n\t\t * @memberOf mitt\n\t\t */\n\t\ton(type, handler) {\n\t\t\tlist(type).add(handler);\n\t\t\treturn ret;\n\t\t},\n\n\t\t/**\n\t\t * Remove an event handler for the given type.\n\t\t *\n\t\t * @param {String} type Type of event to unregister `handler` from, or `\"*\"`\n\t\t * @param {Function} handler Handler function to remove\n\t\t * @return {Object} the `mitt` instance for chaining\n\t\t * @memberOf mitt\n\t\t */\n\t\toff(type, handler) {\n\t\t\tlist(type).delete(handler);\n\t\t\treturn ret;\n\t\t},\n\n\t\t/**\n\t\t * Invoke all handlers for the given type.\n\t\t * If present, `\"*\"` handlers are invoked prior to type-matched handlers.\n\t\t *\n\t\t * @param {String} type The event type to invoke\n\t\t * @param {Any} [arg1] A value (first argument), passed to each handler\n\t\t * @param {Any} [arg2] A value (second argument), passed to each handler\n\t\t * @param {Any} [arg3] A value (third argument), passed to each handler\n\t\t * @return {Object} the `mitt` instance for chaining\n\t\t * @memberof mitt\n\t\t */\n\t\temit(type, arg1, arg2, arg3) {\n\t\t\tlist(type).forEach((handler) => handler(arg1, arg2, arg3));\n\t\t\tlist('*').forEach((handler) => handler(type, arg1, arg2, arg3));\n\t\t\treturn ret;\n\t\t}\n\t};\n\n\t// Get or create a named handler list\n\tlet list = (type) => {\n\t\treturn ret.all[type = type.toLowerCase()] || (ret.all[type] = new Set());\n\t};\n\n\treturn ret;\n}\n"]}
deleted:dist-using-set/mitt.umd.js-2 removed
deleted:dist-using-set/mitt.umd.js.map-1 removed
1{"version":3,"sources":["../src/index.js"],"names":["mitt","let","ret","all","Object","create","on","type","handler","list","add","off","delete","emit","arg1","arg2","arg3","forEach","toLowerCase","Set"],"mappings":"mKAIA,QAAwBA,KACvBC,GAAIC,IACHC,IAAKC,OAAOC,OAAO,MAUnBC,GAAE,SAACC,EAAMC,GAER,MADAC,GAAKF,GAAMG,IAAIF,GACRN,GAWRS,IAAG,SAACJ,EAAMC,GAET,MADAC,GAAKF,GAAMK,OAAOJ,GACXN,GAcRW,KAAI,SAACN,EAAMO,EAAMC,EAAMC,GAGtB,MAFAP,GAAKF,GAAMU,QAAQ,SAACT,GAAS,MAAGA,GAAQM,EAAMC,EAAMC,KACpDP,EAAK,KAAKQ,QAAQ,SAACT,GAAS,MAAGA,GAAQD,EAAMO,EAAMC,EAAMC,KAClDd,IAKLO,EAAO,SAACF,GACX,MAAOL,GAAIC,IAAII,EAAOA,EAAKW,iBAAmBhB,EAAIC,IAAII,GAAQ,GAAIY,MAGnE,OAAOjB","file":"mitt.umd.js","sourcesContent":["/** Mitt: Tiny (~200b) functional event emitter / pubsub.\n * @name mitt\n * @returns {Mitt}\n */\nexport default function mitt () {\n\tlet ret = {\n\t\tall: Object.create(null),\n\n\t\t/**\n\t\t * Register an event handler for the given type.\n\t\t *\n\t\t * @param {String} type Type of event to listen for, or `\"*\"` for all events\n\t\t * @param {Function} handler Function to call in response to given event\n\t\t * @return {Object} the `mitt` instance for chaining\n\t\t * @memberOf mitt\n\t\t */\n\t\ton(type, handler) {\n\t\t\tlist(type).add(handler);\n\t\t\treturn ret;\n\t\t},\n\n\t\t/**\n\t\t * Remove an event handler for the given type.\n\t\t *\n\t\t * @param {String} type Type of event to unregister `handler` from, or `\"*\"`\n\t\t * @param {Function} handler Handler function to remove\n\t\t * @return {Object} the `mitt` instance for chaining\n\t\t * @memberOf mitt\n\t\t */\n\t\toff(type, handler) {\n\t\t\tlist(type).delete(handler);\n\t\t\treturn ret;\n\t\t},\n\n\t\t/**\n\t\t * Invoke all handlers for the given type.\n\t\t * If present, `\"*\"` handlers are invoked prior to type-matched handlers.\n\t\t *\n\t\t * @param {String} type The event type to invoke\n\t\t * @param {Any} [arg1] A value (first argument), passed to each handler\n\t\t * @param {Any} [arg2] A value (second argument), passed to each handler\n\t\t * @param {Any} [arg3] A value (third argument), passed to each handler\n\t\t * @return {Object} the `mitt` instance for chaining\n\t\t * @memberof mitt\n\t\t */\n\t\temit(type, arg1, arg2, arg3) {\n\t\t\tlist(type).forEach((handler) => handler(arg1, arg2, arg3));\n\t\t\tlist('*').forEach((handler) => handler(type, arg1, arg2, arg3));\n\t\t\treturn ret;\n\t\t}\n\t};\n\n\t// Get or create a named handler list\n\tlet list = (type) => {\n\t\treturn ret.all[type = type.toLowerCase()] || (ret.all[type] = new Set());\n\t};\n\n\treturn ret;\n}\n"]}