hookified 1.8.1 → 1.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -5
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
- [.eventNames()](#eventnames)
|
|
49
49
|
- [.listenerCount(eventName?)](#listenercounteventname)
|
|
50
50
|
- [.rawListeners(eventName?)](#rawlistenerseventname)
|
|
51
|
-
- [Development and
|
|
51
|
+
- [Development and Contribution](#development-and-contribution)
|
|
52
52
|
- [Benchmarks](#benchmarks)
|
|
53
53
|
- [License](#license)
|
|
54
54
|
|
|
@@ -799,14 +799,20 @@ myClass.on('message', (message) => {
|
|
|
799
799
|
console.log(myClass.rawListeners('message'));
|
|
800
800
|
```
|
|
801
801
|
|
|
802
|
-
# Development and
|
|
802
|
+
# Development and Contribution
|
|
803
803
|
|
|
804
804
|
Hookified is written in TypeScript and tests are written in `vitest`. To run the tests, use the following command:
|
|
805
805
|
|
|
806
806
|
To setup the environment and run the tests:
|
|
807
807
|
|
|
808
808
|
```bash
|
|
809
|
-
|
|
809
|
+
pnpm i && pnpm test
|
|
810
|
+
```
|
|
811
|
+
|
|
812
|
+
Note that we are using `pnpm` as our package manager. If you don't have it installed, you can install it globally with:
|
|
813
|
+
|
|
814
|
+
```bash
|
|
815
|
+
npm install -g pnpm
|
|
810
816
|
```
|
|
811
817
|
|
|
812
818
|
To contribute follow the [Contributing Guidelines](CONTRIBUTING.md) and [Code of Conduct](CODE_OF_CONDUCT.md).
|
|
@@ -816,10 +822,11 @@ To contribute follow the [Contributing Guidelines](CONTRIBUTING.md) and [Code of
|
|
|
816
822
|
We are doing very simple benchmarking to see how this compares to other libraries using `tinybench`. This is not a full benchmark but just a simple way to see how it performs. Our goal is to be as close or better than the other libraries including native (EventEmitter).
|
|
817
823
|
|
|
818
824
|
## Hooks
|
|
825
|
+
|
|
819
826
|
| name | summary | ops/sec | time/op | margin | samples |
|
|
820
827
|
|-------------------|:---------:|----------:|----------:|:--------:|----------:|
|
|
821
|
-
| Hookified 1.8.0 | 🥇 | 4M |
|
|
822
|
-
| Hookable
|
|
828
|
+
| Hookified 1.8.0 | 🥇 | 4M | 299ns | ±2.42% | 3M |
|
|
829
|
+
| Hookable 5.5.3 | -73% | 982K | 1µs | ±2.92% | 812K |
|
|
823
830
|
|
|
824
831
|
## Emits
|
|
825
832
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hookified",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.2",
|
|
4
4
|
"description": "Event Emitting and Middleware Hooks",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/node/index.cjs",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"benchmark:emit": "pnpm tsx benchmark/emit.ts",
|
|
27
27
|
"website:build": "docula build",
|
|
28
28
|
"website:serve": "docula serve",
|
|
29
|
-
"prepare": "
|
|
29
|
+
"prepare": "pnpm build"
|
|
30
30
|
},
|
|
31
31
|
"keywords": [
|
|
32
32
|
"hooks",
|
|
@@ -60,19 +60,19 @@
|
|
|
60
60
|
},
|
|
61
61
|
"homepage": "https://github.com/jaredwray/hookified#readme",
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@monstermann/tinybench-pretty-printer": "^0.
|
|
64
|
-
"@vitest/coverage-v8": "^3.
|
|
65
|
-
"docula": "^0.
|
|
63
|
+
"@monstermann/tinybench-pretty-printer": "^0.1.0",
|
|
64
|
+
"@vitest/coverage-v8": "^3.1.1",
|
|
65
|
+
"docula": "^0.11.0",
|
|
66
66
|
"emittery": "^1.1.0",
|
|
67
67
|
"eventemitter3": "^5.0.1",
|
|
68
68
|
"hookable": "^5.5.3",
|
|
69
69
|
"pino": "^9.6.0",
|
|
70
70
|
"rimraf": "^6.0.1",
|
|
71
|
-
"tinybench": "^
|
|
71
|
+
"tinybench": "^4.0.1",
|
|
72
72
|
"tsup": "^8.4.0",
|
|
73
73
|
"tsx": "^4.19.3",
|
|
74
|
-
"typescript": "^5.8.
|
|
75
|
-
"vitest": "^3.
|
|
74
|
+
"typescript": "^5.8.3",
|
|
75
|
+
"vitest": "^3.1.1",
|
|
76
76
|
"xo": "^0.60.0"
|
|
77
77
|
},
|
|
78
78
|
"files": [
|