diff --git a/README.md b/README.md index 855fbe0..714c5f2 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # ESMitter -ESMitter *(read: E-S-Emitter; a pun on ESM + emitter)* is an event emitter compatible with Node.js +ESMitter _(read: E-S-Emitter; a pun on ESM + emitter)_ is an event emitter compatible with Node.js and modern browsers. It is a fork of [EventEmitter3](https://github.com/primus/eventemitter3), but natively TypeScript, ESM-only and with more modern tooling. ESMitter is currently in alpha stage. The complete codebase has been converted to TypeScript and EcmaScript module syntax (ESM). ESMitter diff --git a/benchmarks/run/add-remove.mjs b/benchmarks/run/add-remove.mjs index 8a03c48..29beced 100644 --- a/benchmarks/run/add-remove.mjs +++ b/benchmarks/run/add-remove.mjs @@ -61,7 +61,10 @@ import("../../dist/index.js").then((ESMitter) => { console.log(e.target.toString()); }) .on("complete", function completed() { - console.log("Fastest is %s", this.filter("fastest").map("name").join(' & ')); + console.log( + "Fastest is %s", + this.filter("fastest").map("name").join(" & "), + ); }) .run({ async: true }); }); diff --git a/benchmarks/run/context.mjs b/benchmarks/run/context.mjs index b7817d6..fe21ac1 100644 --- a/benchmarks/run/context.mjs +++ b/benchmarks/run/context.mjs @@ -90,7 +90,10 @@ import("../../dist/index.js").then((ESMitter) => { console.log(e.target.toString()); }) .on("complete", function completed() { - console.log("Fastest is %s", this.filter("fastest").map("name").join(' & ')); + console.log( + "Fastest is %s", + this.filter("fastest").map("name").join(" & "), + ); }) .run({ async: true }); }); diff --git a/benchmarks/run/emit-multiple-listeners.mjs b/benchmarks/run/emit-multiple-listeners.mjs index ce0052d..a613c66 100644 --- a/benchmarks/run/emit-multiple-listeners.mjs +++ b/benchmarks/run/emit-multiple-listeners.mjs @@ -97,7 +97,10 @@ import("../../dist/index.js").then((ESMitter) => { console.log(e.target.toString()); }) .on("complete", function completed() { - console.log("Fastest is %s", this.filter("fastest").map("name").join(' & ')); + console.log( + "Fastest is %s", + this.filter("fastest").map("name").join(" & "), + ); }) .run({ async: true }); }); diff --git a/benchmarks/run/emit.mjs b/benchmarks/run/emit.mjs index 099d548..508605b 100644 --- a/benchmarks/run/emit.mjs +++ b/benchmarks/run/emit.mjs @@ -88,7 +88,10 @@ import("../../dist/index.js").then((ESMitter) => { console.log(e.target.toString()); }) .on("complete", function completed() { - console.log("Fastest is %s", this.filter("fastest").map("name").join(' & ')); + console.log( + "Fastest is %s", + this.filter("fastest").map("name").join(" & "), + ); }) .run({ async: true }); }); diff --git a/benchmarks/run/hundreds.mjs b/benchmarks/run/hundreds.mjs index 2522cae..87a4c83 100644 --- a/benchmarks/run/hundreds.mjs +++ b/benchmarks/run/hundreds.mjs @@ -88,7 +88,10 @@ import("../../dist/index.js").then((ESMitter) => { console.log(e.target.toString()); }) .on("complete", function completed() { - console.log("Fastest is %s", this.filter("fastest").map("name").join(' & ')); + console.log( + "Fastest is %s", + this.filter("fastest").map("name").join(" & "), + ); }) .run({ async: true }); }); diff --git a/benchmarks/run/init.mjs b/benchmarks/run/init.mjs index f81e345..4b5a59e 100644 --- a/benchmarks/run/init.mjs +++ b/benchmarks/run/init.mjs @@ -49,7 +49,10 @@ import("../../dist/index.js").then((ESMitter) => { console.log(e.target.toString()); }) .on("complete", function completed() { - console.log("Fastest is %s", this.filter("fastest").map("name").join(' & ')); + console.log( + "Fastest is %s", + this.filter("fastest").map("name").join(" & "), + ); }) .run({ async: true }); }); diff --git a/benchmarks/run/listeners.mjs b/benchmarks/run/listeners.mjs index 99542e3..245f723 100644 --- a/benchmarks/run/listeners.mjs +++ b/benchmarks/run/listeners.mjs @@ -54,7 +54,10 @@ import("../../dist/index.js").then((ESMitter) => { console.log(e.target.toString()); }) .on("complete", function completed() { - console.log("Fastest is %s", this.filter("fastest").map("name").join(' & ')); + console.log( + "Fastest is %s", + this.filter("fastest").map("name").join(" & "), + ); }) .run({ async: true }); }); diff --git a/benchmarks/run/once.mjs b/benchmarks/run/once.mjs index 9e75caf..c1887e5 100644 --- a/benchmarks/run/once.mjs +++ b/benchmarks/run/once.mjs @@ -55,7 +55,10 @@ import("../../dist/index.js").then((ESMitter) => { console.log(e.target.toString()); }) .on("complete", function completed() { - console.log("Fastest is %s", this.filter("fastest").map("name").join(' & ')); + console.log( + "Fastest is %s", + this.filter("fastest").map("name").join(" & "), + ); }) .run({ async: true }); }); diff --git a/benchmarks/run/remove-emit.mjs b/benchmarks/run/remove-emit.mjs index d4987fc..dc64b0f 100644 --- a/benchmarks/run/remove-emit.mjs +++ b/benchmarks/run/remove-emit.mjs @@ -88,7 +88,10 @@ import("../../dist/index.js").then((ESMitter) => { console.log(e.target.toString()); }) .on("complete", function completed() { - console.log("Fastest is %s", this.filter("fastest").map("name").join(' & ')); + console.log( + "Fastest is %s", + this.filter("fastest").map("name").join(" & "), + ); }) .run({ async: true }); }); diff --git a/vitest.config.ts b/vitest.config.ts index 618341a..f56e9a1 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -1,10 +1,10 @@ -import { defineConfig } from 'vitest/config'; +import { defineConfig } from "vitest/config"; export default defineConfig({ test: { coverage: { - reporter: ['text', 'json-summary', 'json'], + reporter: ["text", "json-summary", "json"], reportOnFailure: true, - } - } -}); \ No newline at end of file + }, + }, +});