kareem 2.6.1 → 2.6.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/.eslintrc.json ADDED
@@ -0,0 +1,131 @@
1
+ {
2
+ "extends": [
3
+ "eslint:recommended"
4
+ ],
5
+ "ignorePatterns": [
6
+ "docs",
7
+ "tools",
8
+ "dist",
9
+ "website.js",
10
+ "test/files/*",
11
+ "benchmarks"
12
+ ],
13
+ "overrides": [],
14
+ "plugins": [],
15
+ "parserOptions": {
16
+ "ecmaVersion": 2020
17
+ },
18
+ "env": {
19
+ "node": true,
20
+ "es6": true
21
+ },
22
+ "rules": {
23
+ "no-unused-vars": ["error", { "argsIgnorePattern": "^_" } ],
24
+ "comma-style": "error",
25
+ "indent": [
26
+ "error",
27
+ 2,
28
+ {
29
+ "SwitchCase": 1,
30
+ "VariableDeclarator": 2
31
+ }
32
+ ],
33
+ "keyword-spacing": "error",
34
+ "no-whitespace-before-property": "error",
35
+ "no-buffer-constructor": "warn",
36
+ "no-console": "off",
37
+ "no-constant-condition": "off",
38
+ "no-multi-spaces": "error",
39
+ "func-call-spacing": "error",
40
+ "no-trailing-spaces": "error",
41
+ "no-undef": "error",
42
+ "no-unneeded-ternary": "error",
43
+ "no-const-assign": "error",
44
+ "no-useless-rename": "error",
45
+ "no-dupe-keys": "error",
46
+ "space-in-parens": [
47
+ "error",
48
+ "never"
49
+ ],
50
+ "spaced-comment": [
51
+ "error",
52
+ "always",
53
+ {
54
+ "block": {
55
+ "markers": [
56
+ "!"
57
+ ],
58
+ "balanced": true
59
+ }
60
+ }
61
+ ],
62
+ "key-spacing": [
63
+ "error",
64
+ {
65
+ "beforeColon": false,
66
+ "afterColon": true
67
+ }
68
+ ],
69
+ "comma-spacing": [
70
+ "error",
71
+ {
72
+ "before": false,
73
+ "after": true
74
+ }
75
+ ],
76
+ "array-bracket-spacing": 1,
77
+ "arrow-spacing": [
78
+ "error",
79
+ {
80
+ "before": true,
81
+ "after": true
82
+ }
83
+ ],
84
+ "object-curly-spacing": [
85
+ "error",
86
+ "always"
87
+ ],
88
+ "comma-dangle": [
89
+ "error",
90
+ "never"
91
+ ],
92
+ "no-unreachable": "error",
93
+ "quotes": [
94
+ "error",
95
+ "single"
96
+ ],
97
+ "quote-props": [
98
+ "error",
99
+ "as-needed"
100
+ ],
101
+ "semi": "error",
102
+ "no-extra-semi": "error",
103
+ "semi-spacing": "error",
104
+ "no-spaced-func": "error",
105
+ "no-throw-literal": "error",
106
+ "space-before-blocks": "error",
107
+ "space-before-function-paren": [
108
+ "error",
109
+ "never"
110
+ ],
111
+ "space-infix-ops": "error",
112
+ "space-unary-ops": "error",
113
+ "no-var": "warn",
114
+ "prefer-const": "warn",
115
+ "strict": [
116
+ "error",
117
+ "global"
118
+ ],
119
+ "no-restricted-globals": [
120
+ "error",
121
+ {
122
+ "name": "context",
123
+ "message": "Don't use Mocha's global context"
124
+ }
125
+ ],
126
+ "no-prototype-builtins": "off",
127
+ "no-empty": "off",
128
+ "eol-last": "warn",
129
+ "no-multiple-empty-lines": ["warn", { "max": 2 }]
130
+ }
131
+ }
@@ -0,0 +1,47 @@
1
+ name: Test
2
+ on:
3
+ pull_request:
4
+ push:
5
+ permissions:
6
+ contents: read
7
+
8
+ jobs:
9
+ test:
10
+ runs-on: ${{ matrix.os }}
11
+ strategy:
12
+ fail-fast: false
13
+ matrix:
14
+ node: [12, 14, 16, 18]
15
+ os: [ubuntu-20.04]
16
+ name: Node ${{ matrix.node }}
17
+ steps:
18
+ - uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # v3
19
+
20
+ - name: Setup node
21
+ uses: actions/setup-node@5b52f097d36d4b0b2f94ed6de710023fbb8b2236 # v3.1.0
22
+ with:
23
+ node-version: ${{ matrix.node }}
24
+
25
+ - run: npm install
26
+
27
+ - run: npm run test-coverage
28
+
29
+ lint:
30
+ runs-on: ${{ matrix.os }}
31
+ strategy:
32
+ fail-fast: false
33
+ matrix:
34
+ node: [18]
35
+ os: [ubuntu-20.04]
36
+ name: Lint
37
+ steps:
38
+ - uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # v3
39
+
40
+ - name: Setup node
41
+ uses: actions/setup-node@5b52f097d36d4b0b2f94ed6de710023fbb8b2236 # v3.1.0
42
+ with:
43
+ node-version: ${{ matrix.node }}
44
+
45
+ - run: npm install
46
+
47
+ - run: npm run lint
package/CHANGELOG.md ADDED
@@ -0,0 +1,823 @@
1
+ # Changelog
2
+
3
+ <a name="2.6.0"></a>
4
+ ## 2.6.0 (2024-03-04)
5
+
6
+ * feat: add TypeScript types
7
+
8
+ <a name="2.5.1"></a>
9
+ ## 2.5.1 (2023-01-06)
10
+
11
+ * fix: avoid passing final callback to pre hook, because calling the callback can mess up hook execution #36 Automattic/mongoose#12836
12
+
13
+ <a name="2.5.0"></a>
14
+ ## 2.5.0 (2022-12-01)
15
+
16
+ * feat: add errorHandler option to `post()` #34
17
+
18
+ <a name="2.4.0"></a>
19
+ ## 2.4.0 (2022-06-13)
20
+
21
+ * feat: add `overwriteResult()` and `skipWrappedFunction()` for more advanced control flow
22
+
23
+ <a name="2.3.4"></a>
24
+ ## 2.3.4 (2022-02-10)
25
+
26
+ * perf: various performance improvements #27 #24 #23 #22 #21 #20
27
+
28
+ <a name="2.3.3"></a>
29
+ ## 2.3.3 (2021-12-26)
30
+
31
+ * fix: handle sync errors in `wrap()`
32
+
33
+ <a name="2.3.2"></a>
34
+ ## 2.3.2 (2020-12-08)
35
+
36
+ * fix: handle sync errors in pre hooks if there are multiple hooks
37
+
38
+ <a name="2.3.0"></a>
39
+ ## 2.3.0 (2018-09-24)
40
+
41
+ * chore(release): 2.2.3 ([c8f2695](https://github.com/vkarpov15/kareem/commit/c8f2695))
42
+ * chore(release): 2.2.4 ([a377a4f](https://github.com/vkarpov15/kareem/commit/a377a4f))
43
+ * chore(release): 2.2.5 ([5a495e3](https://github.com/vkarpov15/kareem/commit/5a495e3))
44
+ * fix(filter): copy async pres correctly with `filter()` ([1b1ed8a](https://github.com/vkarpov15/kareem/commit/1b1ed8a)), closes [Automattic/mongoose#3054](https://github.com/Automattic/mongoose/issues/3054)
45
+ * feat: add filter() function ([1f641f4](https://github.com/vkarpov15/kareem/commit/1f641f4))
46
+ * feat: support storing options on pre and post hooks ([59220b9](https://github.com/vkarpov15/kareem/commit/59220b9))
47
+
48
+
49
+
50
+ <a name="2.2.3"></a>
51
+ ## <small>2.2.3 (2018-09-10)</small>
52
+
53
+ * chore: release 2.2.3 ([af653a3](https://github.com/vkarpov15/kareem/commit/af653a3))
54
+
55
+
56
+
57
+ <a name="2.2.2"></a>
58
+ ## <small>2.2.2 (2018-09-10)</small>
59
+
60
+ * chore: release 2.2.2 ([3f0144d](https://github.com/vkarpov15/kareem/commit/3f0144d))
61
+ * fix: allow merge() to not clone ([e628d65](https://github.com/vkarpov15/kareem/commit/e628d65))
62
+
63
+
64
+
65
+ <a name="2.2.1"></a>
66
+ ## <small>2.2.1 (2018-06-05)</small>
67
+
68
+ * chore: release 2.2.1 ([4625a64](https://github.com/vkarpov15/kareem/commit/4625a64))
69
+ * chore: remove lockfile from git ([7f3e4e6](https://github.com/vkarpov15/kareem/commit/7f3e4e6))
70
+ * fix: handle numAsync correctly when merging ([fef8e7e](https://github.com/vkarpov15/kareem/commit/fef8e7e))
71
+ * test: repro issue with not copying numAsync ([952d9db](https://github.com/vkarpov15/kareem/commit/952d9db))
72
+
73
+
74
+
75
+ <a name="2.2.0"></a>
76
+ ## 2.2.0 (2018-06-05)
77
+
78
+ * chore: release 2.2.0 ([ff9ad03](https://github.com/vkarpov15/kareem/commit/ff9ad03))
79
+ * fix: use maps instead of objects for _pres and _posts so `toString()` doesn't get reported as having ([55df303](https://github.com/vkarpov15/kareem/commit/55df303)), closes [Automattic/mongoose#6538](https://github.com/Automattic/mongoose/issues/6538)
80
+
81
+
82
+
83
+ <a name="2.1.0"></a>
84
+ ## 2.1.0 (2018-05-16)
85
+
86
+ * chore: release 2.1.0 ([ba5f1bc](https://github.com/vkarpov15/kareem/commit/ba5f1bc))
87
+ * feat: add option to check wrapped function return value for promises ([c9d7dd1](https://github.com/vkarpov15/kareem/commit/c9d7dd1))
88
+ * refactor: use const in wrap() ([0fc21f9](https://github.com/vkarpov15/kareem/commit/0fc21f9))
89
+
90
+
91
+
92
+ <a name="2.0.7"></a>
93
+ ## <small>2.0.7 (2018-04-28)</small>
94
+
95
+ * chore: release 2.0.7 ([0bf91e6](https://github.com/vkarpov15/kareem/commit/0bf91e6))
96
+ * feat: add `hasHooks()` ([225f18d](https://github.com/vkarpov15/kareem/commit/225f18d)), closes [Automattic/mongoose#6385](https://github.com/Automattic/mongoose/issues/6385)
97
+
98
+
99
+
100
+ <a name="2.0.6"></a>
101
+ ## <small>2.0.6 (2018-03-22)</small>
102
+
103
+ * chore: release 2.0.6 ([f3d406b](https://github.com/vkarpov15/kareem/commit/f3d406b))
104
+ * fix(wrap): ensure fast path still wraps function in `nextTick()` for chaining ([7000494](https://github.com/vkarpov15/kareem/commit/7000494)), closes [Automattic/mongoose#6250](https://github.com/Automattic/mongoose/issues/6250) [dsanel/mongoose-delete#36](https://github.com/dsanel/mongoose-delete/issues/36)
105
+
106
+
107
+
108
+ <a name="2.0.5"></a>
109
+ ## <small>2.0.5 (2018-02-22)</small>
110
+
111
+ * chore: release 2.0.5 ([3286612](https://github.com/vkarpov15/kareem/commit/3286612))
112
+ * perf(createWrapper): don't create wrapper if there are no hooks ([5afc5b9](https://github.com/vkarpov15/kareem/commit/5afc5b9)), closes [Automattic/mongoose#6126](https://github.com/Automattic/mongoose/issues/6126)
113
+
114
+
115
+
116
+ <a name="2.0.4"></a>
117
+ ## <small>2.0.4 (2018-02-08)</small>
118
+
119
+ * chore: release 2.0.4 ([2ab0293](https://github.com/vkarpov15/kareem/commit/2ab0293))
120
+
121
+
122
+
123
+ <a name="2.0.3"></a>
124
+ ## <small>2.0.3 (2018-02-01)</small>
125
+
126
+ * chore: release 2.0.3 ([3c1abe5](https://github.com/vkarpov15/kareem/commit/3c1abe5))
127
+ * fix: use process.nextTick() re: Automattic/mongoose#6074 ([e5bfe33](https://github.com/vkarpov15/kareem/commit/e5bfe33)), closes [Automattic/mongoose#6074](https://github.com/Automattic/mongoose/issues/6074)
128
+
129
+
130
+
131
+ <a name="2.0.2"></a>
132
+ ## <small>2.0.2 (2018-01-24)</small>
133
+
134
+ * chore: fix license ([a9d755c](https://github.com/vkarpov15/kareem/commit/a9d755c)), closes [#10](https://github.com/vkarpov15/kareem/issues/10)
135
+ * chore: release 2.0.2 ([fe87ab6](https://github.com/vkarpov15/kareem/commit/fe87ab6))
136
+
137
+
138
+
139
+ <a name="2.0.1"></a>
140
+ ## <small>2.0.1 (2018-01-09)</small>
141
+
142
+ * chore: release 2.0.1 with lockfile bump ([09c44fb](https://github.com/vkarpov15/kareem/commit/09c44fb))
143
+
144
+
145
+
146
+ <a name="2.0.0"></a>
147
+ ## 2.0.0 (2018-01-09)
148
+
149
+ * chore: bump marked re: security ([cc564a9](https://github.com/vkarpov15/kareem/commit/cc564a9))
150
+ * chore: release 2.0.0 ([f511d1c](https://github.com/vkarpov15/kareem/commit/f511d1c))
151
+
152
+
153
+
154
+ <a name="2.0.0-rc5"></a>
155
+ ## 2.0.0-rc5 (2017-12-23)
156
+
157
+ * chore: fix build on node 4+5 ([6dac5a4](https://github.com/vkarpov15/kareem/commit/6dac5a4))
158
+ * chore: fix built on node 4 + 5 again ([434ef0a](https://github.com/vkarpov15/kareem/commit/434ef0a))
159
+ * chore: release 2.0.0-rc5 ([25a32ee](https://github.com/vkarpov15/kareem/commit/25a32ee))
160
+
161
+
162
+
163
+ <a name="2.0.0-rc4"></a>
164
+ ## 2.0.0-rc4 (2017-12-22)
165
+
166
+ * chore: release 2.0.0-rc4 ([49fc083](https://github.com/vkarpov15/kareem/commit/49fc083))
167
+ * BREAKING CHANGE: deduplicate when merging hooks re: Automattic/mongoose#2945 ([d458573](https://github.com/vkarpov15/kareem/commit/d458573)), closes [Automattic/mongoose#2945](https://github.com/Automattic/mongoose/issues/2945)
168
+
169
+
170
+
171
+ <a name="2.0.0-rc3"></a>
172
+ ## 2.0.0-rc3 (2017-12-22)
173
+
174
+ * chore: release 2.0.0-rc3 ([adaaa00](https://github.com/vkarpov15/kareem/commit/adaaa00))
175
+ * feat: support returning promises from middleware functions ([05b4480](https://github.com/vkarpov15/kareem/commit/05b4480)), closes [Automattic/mongoose#3779](https://github.com/Automattic/mongoose/issues/3779)
176
+
177
+
178
+
179
+ <a name="2.0.0-rc2"></a>
180
+ ## 2.0.0-rc2 (2017-12-21)
181
+
182
+ * chore: release 2.0.0-rc2 ([76325fa](https://github.com/vkarpov15/kareem/commit/76325fa))
183
+ * fix: ensure next() and done() run in next tick ([6c20684](https://github.com/vkarpov15/kareem/commit/6c20684))
184
+
185
+
186
+
187
+ <a name="2.0.0-rc1"></a>
188
+ ## 2.0.0-rc1 (2017-12-21)
189
+
190
+ * chore: improve test coverage re: Automattic/mongoose#3232 ([7b45cf0](https://github.com/vkarpov15/kareem/commit/7b45cf0)), closes [Automattic/mongoose#3232](https://github.com/Automattic/mongoose/issues/3232)
191
+ * chore: release 2.0.0-rc1 ([9b83f52](https://github.com/vkarpov15/kareem/commit/9b83f52))
192
+ * BREAKING CHANGE: report sync exceptions as errors, only allow calling next() and done() once ([674adcc](https://github.com/vkarpov15/kareem/commit/674adcc)), closes [Automattic/mongoose#3483](https://github.com/Automattic/mongoose/issues/3483)
193
+
194
+
195
+
196
+ <a name="2.0.0-rc0"></a>
197
+ ## 2.0.0-rc0 (2017-12-17)
198
+
199
+ * chore: release 2.0.0-rc0 ([16b44b5](https://github.com/vkarpov15/kareem/commit/16b44b5))
200
+ * BREAKING CHANGE: drop support for node < 4 ([9cbb8c7](https://github.com/vkarpov15/kareem/commit/9cbb8c7))
201
+ * BREAKING CHANGE: remove useLegacyPost and add several new features ([6dd8531](https://github.com/vkarpov15/kareem/commit/6dd8531)), closes [Automattic/mongoose#3232](https://github.com/Automattic/mongoose/issues/3232)
202
+
203
+
204
+
205
+ <a name="1.5.0"></a>
206
+ ## 1.5.0 (2017-07-20)
207
+
208
+ * chore: release 1.5.0 ([9c491a0](https://github.com/vkarpov15/kareem/commit/9c491a0))
209
+ * fix: improve post error handlers results ([9928dd5](https://github.com/vkarpov15/kareem/commit/9928dd5)), closes [Automattic/mongoose#5466](https://github.com/Automattic/mongoose/issues/5466)
210
+
211
+
212
+
213
+ <a name="1.4.2"></a>
214
+ ## <small>1.4.2 (2017-07-06)</small>
215
+
216
+ * chore: release 1.4.2 ([8d14ac5](https://github.com/vkarpov15/kareem/commit/8d14ac5))
217
+ * fix: correct args re: Automattic/mongoose#5405 ([3f28ae6](https://github.com/vkarpov15/kareem/commit/3f28ae6)), closes [Automattic/mongoose#5405](https://github.com/Automattic/mongoose/issues/5405)
218
+
219
+
220
+
221
+ <a name="1.4.1"></a>
222
+ ## <small>1.4.1 (2017-04-25)</small>
223
+
224
+ * chore: release 1.4.1 ([5ecf0c2](https://github.com/vkarpov15/kareem/commit/5ecf0c2))
225
+ * fix: handle numAsyncPres with clone() ([c72e857](https://github.com/vkarpov15/kareem/commit/c72e857)), closes [#8](https://github.com/vkarpov15/kareem/issues/8)
226
+ * test: repro #8 ([9b4d6b2](https://github.com/vkarpov15/kareem/commit/9b4d6b2)), closes [#8](https://github.com/vkarpov15/kareem/issues/8)
227
+
228
+
229
+
230
+ <a name="1.4.0"></a>
231
+ ## 1.4.0 (2017-04-19)
232
+
233
+ * chore: release 1.4.0 ([101c5f5](https://github.com/vkarpov15/kareem/commit/101c5f5))
234
+ * feat: add merge() function ([285325e](https://github.com/vkarpov15/kareem/commit/285325e))
235
+
236
+
237
+
238
+ <a name="1.3.0"></a>
239
+ ## 1.3.0 (2017-03-26)
240
+
241
+ * chore: release 1.3.0 ([f3a9e50](https://github.com/vkarpov15/kareem/commit/f3a9e50))
242
+ * feat: pass function args to execPre ([4dd466d](https://github.com/vkarpov15/kareem/commit/4dd466d))
243
+
244
+
245
+
246
+ <a name="1.2.1"></a>
247
+ ## <small>1.2.1 (2017-02-03)</small>
248
+
249
+ * chore: release 1.2.1 ([d97081f](https://github.com/vkarpov15/kareem/commit/d97081f))
250
+ * fix: filter out _kareemIgnored args for error handlers re: Automattic/mongoose#4925 ([ddc7aeb](https://github.com/vkarpov15/kareem/commit/ddc7aeb)), closes [Automattic/mongoose#4925](https://github.com/Automattic/mongoose/issues/4925)
251
+ * fix: make error handlers handle errors in pre hooks ([af38033](https://github.com/vkarpov15/kareem/commit/af38033)), closes [Automattic/mongoose#4927](https://github.com/Automattic/mongoose/issues/4927)
252
+
253
+
254
+
255
+ <a name="1.2.0"></a>
256
+ ## 1.2.0 (2017-01-02)
257
+
258
+ * chore: release 1.2.0 ([033225c](https://github.com/vkarpov15/kareem/commit/033225c))
259
+ * chore: upgrade deps ([f9e9a09](https://github.com/vkarpov15/kareem/commit/f9e9a09))
260
+ * feat: add _kareemIgnore re: Automattic/mongoose#4836 ([7957771](https://github.com/vkarpov15/kareem/commit/7957771)), closes [Automattic/mongoose#4836](https://github.com/Automattic/mongoose/issues/4836)
261
+
262
+
263
+
264
+ <a name="1.1.5"></a>
265
+ ## <small>1.1.5 (2016-12-13)</small>
266
+
267
+ * chore: release 1.1.5 ([1a9f684](https://github.com/vkarpov15/kareem/commit/1a9f684))
268
+ * fix: correct field name ([04a0e9d](https://github.com/vkarpov15/kareem/commit/04a0e9d))
269
+
270
+
271
+
272
+ <a name="1.1.4"></a>
273
+ ## <small>1.1.4 (2016-12-09)</small>
274
+
275
+ * chore: release 1.1.4 ([ece401c](https://github.com/vkarpov15/kareem/commit/ece401c))
276
+ * chore: run tests on node 6 ([e0cb1cb](https://github.com/vkarpov15/kareem/commit/e0cb1cb))
277
+ * fix: only copy own properties in clone() ([dfe28ce](https://github.com/vkarpov15/kareem/commit/dfe28ce)), closes [#7](https://github.com/vkarpov15/kareem/issues/7)
278
+
279
+
280
+
281
+ <a name="1.1.3"></a>
282
+ ## <small>1.1.3 (2016-06-27)</small>
283
+
284
+ * chore: release 1.1.3 ([87171c8](https://github.com/vkarpov15/kareem/commit/87171c8))
285
+ * fix: couple more issues with arg processing ([c65f523](https://github.com/vkarpov15/kareem/commit/c65f523))
286
+
287
+
288
+
289
+ <a name="1.1.2"></a>
290
+ ## <small>1.1.2 (2016-06-27)</small>
291
+
292
+ * chore: release 1.1.2 ([8e102b6](https://github.com/vkarpov15/kareem/commit/8e102b6))
293
+ * fix: add early return ([4feda4e](https://github.com/vkarpov15/kareem/commit/4feda4e))
294
+
295
+
296
+
297
+ <a name="1.1.1"></a>
298
+ ## <small>1.1.1 (2016-06-27)</small>
299
+
300
+ * chore: release 1.1.1 ([8bb3050](https://github.com/vkarpov15/kareem/commit/8bb3050))
301
+ * fix: skip error handlers if no error ([0eb3a44](https://github.com/vkarpov15/kareem/commit/0eb3a44))
302
+
303
+
304
+
305
+ <a name="1.1.0"></a>
306
+ ## 1.1.0 (2016-05-11)
307
+
308
+ * chore: release 1.1.0 ([85332d9](https://github.com/vkarpov15/kareem/commit/85332d9))
309
+ * chore: test on node 4 and node 5 ([1faefa1](https://github.com/vkarpov15/kareem/commit/1faefa1))
310
+ * 100% coverage again ([c9aee4e](https://github.com/vkarpov15/kareem/commit/c9aee4e))
311
+ * add support for error post hooks ([d378113](https://github.com/vkarpov15/kareem/commit/d378113))
312
+ * basic setup for sync hooks #4 ([55aa081](https://github.com/vkarpov15/kareem/commit/55aa081)), closes [#4](https://github.com/vkarpov15/kareem/issues/4)
313
+ * proof of concept for error handlers ([e4a07d9](https://github.com/vkarpov15/kareem/commit/e4a07d9))
314
+ * refactor out handleWrapError helper ([b19af38](https://github.com/vkarpov15/kareem/commit/b19af38))
315
+
316
+
317
+
318
+ <a name="1.0.1"></a>
319
+ ## <small>1.0.1 (2015-05-10)</small>
320
+
321
+ * Fix #1 ([de60dc6](https://github.com/vkarpov15/kareem/commit/de60dc6)), closes [#1](https://github.com/vkarpov15/kareem/issues/1)
322
+ * release 1.0.1 ([6971088](https://github.com/vkarpov15/kareem/commit/6971088))
323
+ * Run tests on iojs in travis ([adcd201](https://github.com/vkarpov15/kareem/commit/adcd201))
324
+ * support legacy post hook behavior in wrap() ([23fa74c](https://github.com/vkarpov15/kareem/commit/23fa74c))
325
+ * Use node 0.12 in travis ([834689d](https://github.com/vkarpov15/kareem/commit/834689d))
326
+
327
+
328
+
329
+ <a name="1.0.0"></a>
330
+ ## 1.0.0 (2015-01-28)
331
+
332
+ * Tag 1.0.0 ([4c5a35a](https://github.com/vkarpov15/kareem/commit/4c5a35a))
333
+
334
+
335
+
336
+ <a name="0.0.8"></a>
337
+ ## <small>0.0.8 (2015-01-27)</small>
338
+
339
+ * Add clone function ([688bba7](https://github.com/vkarpov15/kareem/commit/688bba7))
340
+ * Add jscs for style checking ([5c93149](https://github.com/vkarpov15/kareem/commit/5c93149))
341
+ * Bump 0.0.8 ([03c0d2f](https://github.com/vkarpov15/kareem/commit/03c0d2f))
342
+ * Fix jscs config, add gulp rules ([9989abf](https://github.com/vkarpov15/kareem/commit/9989abf))
343
+ * fix Makefile typo ([1f7e61a](https://github.com/vkarpov15/kareem/commit/1f7e61a))
344
+
345
+
346
+
347
+ <a name="0.0.7"></a>
348
+ ## <small>0.0.7 (2015-01-04)</small>
349
+
350
+ * Bump 0.0.7 ([98ef173](https://github.com/vkarpov15/kareem/commit/98ef173))
351
+ * fix LearnBoost/mongoose#2553 - use null instead of undefined for err ([9157b48](https://github.com/vkarpov15/kareem/commit/9157b48)), closes [LearnBoost/mongoose#2553](https://github.com/LearnBoost/mongoose/issues/2553)
352
+ * Regenerate docs ([2331cdf](https://github.com/vkarpov15/kareem/commit/2331cdf))
353
+
354
+
355
+
356
+ <a name="0.0.6"></a>
357
+ ## <small>0.0.6 (2015-01-01)</small>
358
+
359
+ * Update docs and bump 0.0.6 ([92c12a7](https://github.com/vkarpov15/kareem/commit/92c12a7))
360
+
361
+
362
+
363
+ <a name="0.0.5"></a>
364
+ ## <small>0.0.5 (2015-01-01)</small>
365
+
366
+ * Add coverage rule to Makefile ([825a91c](https://github.com/vkarpov15/kareem/commit/825a91c))
367
+ * Add coveralls to README ([fb52369](https://github.com/vkarpov15/kareem/commit/fb52369))
368
+ * Add coveralls to travis ([93f6f15](https://github.com/vkarpov15/kareem/commit/93f6f15))
369
+ * Add createWrapper() function ([ea77741](https://github.com/vkarpov15/kareem/commit/ea77741))
370
+ * Add istanbul code coverage ([6eceeef](https://github.com/vkarpov15/kareem/commit/6eceeef))
371
+ * Add some more comments for examples ([c5b0c6f](https://github.com/vkarpov15/kareem/commit/c5b0c6f))
372
+ * Add travis ([e6dcb06](https://github.com/vkarpov15/kareem/commit/e6dcb06))
373
+ * Add travis badge to docs ([ad8c9b3](https://github.com/vkarpov15/kareem/commit/ad8c9b3))
374
+ * Add wrap() tests, 100% coverage ([6945be4](https://github.com/vkarpov15/kareem/commit/6945be4))
375
+ * Better test coverage for execPost ([d9ad539](https://github.com/vkarpov15/kareem/commit/d9ad539))
376
+ * Bump 0.0.5 ([69875b1](https://github.com/vkarpov15/kareem/commit/69875b1))
377
+ * Docs fix ([15b7098](https://github.com/vkarpov15/kareem/commit/15b7098))
378
+ * Fix silly mistake in docs generation ([50373eb](https://github.com/vkarpov15/kareem/commit/50373eb))
379
+ * Fix typo in readme ([fec4925](https://github.com/vkarpov15/kareem/commit/fec4925))
380
+ * Linkify travis badge ([92b25fe](https://github.com/vkarpov15/kareem/commit/92b25fe))
381
+ * Make travis run coverage ([747157b](https://github.com/vkarpov15/kareem/commit/747157b))
382
+ * Move travis status badge ([d52e89b](https://github.com/vkarpov15/kareem/commit/d52e89b))
383
+ * Quick fix for coverage ([50bbddb](https://github.com/vkarpov15/kareem/commit/50bbddb))
384
+ * Typo fix ([adea794](https://github.com/vkarpov15/kareem/commit/adea794))
385
+
386
+
387
+
388
+ <a name="0.0.4"></a>
389
+ ## <small>0.0.4 (2014-12-13)</small>
390
+
391
+ * Bump 0.0.4, run docs generation ([51a15fe](https://github.com/vkarpov15/kareem/commit/51a15fe))
392
+ * Use correct post parameters in wrap() ([9bb5da3](https://github.com/vkarpov15/kareem/commit/9bb5da3))
393
+
394
+
395
+
396
+ <a name="0.0.3"></a>
397
+ ## <small>0.0.3 (2014-12-12)</small>
398
+
399
+ * Add npm test script, fix small bug with args not getting passed through post ([49e3e68](https://github.com/vkarpov15/kareem/commit/49e3e68))
400
+ * Bump 0.0.3 ([65621d8](https://github.com/vkarpov15/kareem/commit/65621d8))
401
+ * Update readme ([901388b](https://github.com/vkarpov15/kareem/commit/901388b))
402
+
403
+
404
+
405
+ <a name="0.0.2"></a>
406
+ ## <small>0.0.2 (2014-12-12)</small>
407
+
408
+ * Add github repo and bump 0.0.2 ([59db8be](https://github.com/vkarpov15/kareem/commit/59db8be))
409
+
410
+
411
+
412
+ <a name="0.0.1"></a>
413
+ ## <small>0.0.1 (2014-12-12)</small>
414
+
415
+ * Add basic docs ([ad29ea4](https://github.com/vkarpov15/kareem/commit/ad29ea4))
416
+ * Add pre hooks ([2ffc356](https://github.com/vkarpov15/kareem/commit/2ffc356))
417
+ * Add wrap function ([68c540c](https://github.com/vkarpov15/kareem/commit/68c540c))
418
+ * Bump to version 0.0.1 ([a4bfd68](https://github.com/vkarpov15/kareem/commit/a4bfd68))
419
+ * Initial commit ([4002458](https://github.com/vkarpov15/kareem/commit/4002458))
420
+ * Initial deposit ([98fc489](https://github.com/vkarpov15/kareem/commit/98fc489))
421
+ * Post hooks ([395b67c](https://github.com/vkarpov15/kareem/commit/395b67c))
422
+ * Some basic setup work ([82df75e](https://github.com/vkarpov15/kareem/commit/82df75e))
423
+ * Support sync pre hooks ([1cc1b9f](https://github.com/vkarpov15/kareem/commit/1cc1b9f))
424
+ * Update package.json description ([978da18](https://github.com/vkarpov15/kareem/commit/978da18))
425
+
426
+
427
+
428
+ <a name="2.2.5"></a>
429
+ ## <small>2.2.5 (2018-09-24)</small>
430
+
431
+
432
+
433
+
434
+ <a name="2.2.4"></a>
435
+ ## <small>2.2.4 (2018-09-24)</small>
436
+
437
+
438
+
439
+
440
+ <a name="2.2.3"></a>
441
+ ## <small>2.2.3 (2018-09-24)</small>
442
+
443
+ * fix(filter): copy async pres correctly with `filter()` ([1b1ed8a](https://github.com/vkarpov15/kareem/commit/1b1ed8a)), closes [Automattic/mongoose#3054](https://github.com/Automattic/mongoose/issues/3054)
444
+ * feat: add filter() function ([1f641f4](https://github.com/vkarpov15/kareem/commit/1f641f4))
445
+ * feat: support storing options on pre and post hooks ([59220b9](https://github.com/vkarpov15/kareem/commit/59220b9))
446
+
447
+
448
+
449
+ <a name="2.2.3"></a>
450
+ ## <small>2.2.3 (2018-09-10)</small>
451
+
452
+ * chore: release 2.2.3 ([af653a3](https://github.com/vkarpov15/kareem/commit/af653a3))
453
+
454
+
455
+
456
+ <a name="2.2.2"></a>
457
+ ## <small>2.2.2 (2018-09-10)</small>
458
+
459
+ * chore: release 2.2.2 ([3f0144d](https://github.com/vkarpov15/kareem/commit/3f0144d))
460
+ * fix: allow merge() to not clone ([e628d65](https://github.com/vkarpov15/kareem/commit/e628d65))
461
+
462
+
463
+
464
+ <a name="2.2.1"></a>
465
+ ## <small>2.2.1 (2018-06-05)</small>
466
+
467
+ * chore: release 2.2.1 ([4625a64](https://github.com/vkarpov15/kareem/commit/4625a64))
468
+ * chore: remove lockfile from git ([7f3e4e6](https://github.com/vkarpov15/kareem/commit/7f3e4e6))
469
+ * fix: handle numAsync correctly when merging ([fef8e7e](https://github.com/vkarpov15/kareem/commit/fef8e7e))
470
+ * test: repro issue with not copying numAsync ([952d9db](https://github.com/vkarpov15/kareem/commit/952d9db))
471
+
472
+
473
+
474
+ <a name="2.2.0"></a>
475
+ ## 2.2.0 (2018-06-05)
476
+
477
+ * chore: release 2.2.0 ([ff9ad03](https://github.com/vkarpov15/kareem/commit/ff9ad03))
478
+ * fix: use maps instead of objects for _pres and _posts so `toString()` doesn't get reported as having ([55df303](https://github.com/vkarpov15/kareem/commit/55df303)), closes [Automattic/mongoose#6538](https://github.com/Automattic/mongoose/issues/6538)
479
+
480
+
481
+
482
+ <a name="2.1.0"></a>
483
+ ## 2.1.0 (2018-05-16)
484
+
485
+ * chore: release 2.1.0 ([ba5f1bc](https://github.com/vkarpov15/kareem/commit/ba5f1bc))
486
+ * feat: add option to check wrapped function return value for promises ([c9d7dd1](https://github.com/vkarpov15/kareem/commit/c9d7dd1))
487
+ * refactor: use const in wrap() ([0fc21f9](https://github.com/vkarpov15/kareem/commit/0fc21f9))
488
+
489
+
490
+
491
+ <a name="2.0.7"></a>
492
+ ## <small>2.0.7 (2018-04-28)</small>
493
+
494
+ * chore: release 2.0.7 ([0bf91e6](https://github.com/vkarpov15/kareem/commit/0bf91e6))
495
+ * feat: add `hasHooks()` ([225f18d](https://github.com/vkarpov15/kareem/commit/225f18d)), closes [Automattic/mongoose#6385](https://github.com/Automattic/mongoose/issues/6385)
496
+
497
+
498
+
499
+ <a name="2.0.6"></a>
500
+ ## <small>2.0.6 (2018-03-22)</small>
501
+
502
+ * chore: release 2.0.6 ([f3d406b](https://github.com/vkarpov15/kareem/commit/f3d406b))
503
+ * fix(wrap): ensure fast path still wraps function in `nextTick()` for chaining ([7000494](https://github.com/vkarpov15/kareem/commit/7000494)), closes [Automattic/mongoose#6250](https://github.com/Automattic/mongoose/issues/6250) [dsanel/mongoose-delete#36](https://github.com/dsanel/mongoose-delete/issues/36)
504
+
505
+
506
+
507
+ <a name="2.0.5"></a>
508
+ ## <small>2.0.5 (2018-02-22)</small>
509
+
510
+ * chore: release 2.0.5 ([3286612](https://github.com/vkarpov15/kareem/commit/3286612))
511
+ * perf(createWrapper): don't create wrapper if there are no hooks ([5afc5b9](https://github.com/vkarpov15/kareem/commit/5afc5b9)), closes [Automattic/mongoose#6126](https://github.com/Automattic/mongoose/issues/6126)
512
+
513
+
514
+
515
+ <a name="2.0.4"></a>
516
+ ## <small>2.0.4 (2018-02-08)</small>
517
+
518
+ * chore: release 2.0.4 ([2ab0293](https://github.com/vkarpov15/kareem/commit/2ab0293))
519
+
520
+
521
+
522
+ <a name="2.0.3"></a>
523
+ ## <small>2.0.3 (2018-02-01)</small>
524
+
525
+ * chore: release 2.0.3 ([3c1abe5](https://github.com/vkarpov15/kareem/commit/3c1abe5))
526
+ * fix: use process.nextTick() re: Automattic/mongoose#6074 ([e5bfe33](https://github.com/vkarpov15/kareem/commit/e5bfe33)), closes [Automattic/mongoose#6074](https://github.com/Automattic/mongoose/issues/6074)
527
+
528
+
529
+
530
+ <a name="2.0.2"></a>
531
+ ## <small>2.0.2 (2018-01-24)</small>
532
+
533
+ * chore: fix license ([a9d755c](https://github.com/vkarpov15/kareem/commit/a9d755c)), closes [#10](https://github.com/vkarpov15/kareem/issues/10)
534
+ * chore: release 2.0.2 ([fe87ab6](https://github.com/vkarpov15/kareem/commit/fe87ab6))
535
+
536
+
537
+
538
+ <a name="2.0.1"></a>
539
+ ## <small>2.0.1 (2018-01-09)</small>
540
+
541
+ * chore: release 2.0.1 with lockfile bump ([09c44fb](https://github.com/vkarpov15/kareem/commit/09c44fb))
542
+
543
+
544
+
545
+ <a name="2.0.0"></a>
546
+ ## 2.0.0 (2018-01-09)
547
+
548
+ * chore: bump marked re: security ([cc564a9](https://github.com/vkarpov15/kareem/commit/cc564a9))
549
+ * chore: release 2.0.0 ([f511d1c](https://github.com/vkarpov15/kareem/commit/f511d1c))
550
+
551
+
552
+
553
+ <a name="2.0.0-rc5"></a>
554
+ ## 2.0.0-rc5 (2017-12-23)
555
+
556
+ * chore: fix build on node 4+5 ([6dac5a4](https://github.com/vkarpov15/kareem/commit/6dac5a4))
557
+ * chore: fix built on node 4 + 5 again ([434ef0a](https://github.com/vkarpov15/kareem/commit/434ef0a))
558
+ * chore: release 2.0.0-rc5 ([25a32ee](https://github.com/vkarpov15/kareem/commit/25a32ee))
559
+
560
+
561
+
562
+ <a name="2.0.0-rc4"></a>
563
+ ## 2.0.0-rc4 (2017-12-22)
564
+
565
+ * chore: release 2.0.0-rc4 ([49fc083](https://github.com/vkarpov15/kareem/commit/49fc083))
566
+ * BREAKING CHANGE: deduplicate when merging hooks re: Automattic/mongoose#2945 ([d458573](https://github.com/vkarpov15/kareem/commit/d458573)), closes [Automattic/mongoose#2945](https://github.com/Automattic/mongoose/issues/2945)
567
+
568
+
569
+
570
+ <a name="2.0.0-rc3"></a>
571
+ ## 2.0.0-rc3 (2017-12-22)
572
+
573
+ * chore: release 2.0.0-rc3 ([adaaa00](https://github.com/vkarpov15/kareem/commit/adaaa00))
574
+ * feat: support returning promises from middleware functions ([05b4480](https://github.com/vkarpov15/kareem/commit/05b4480)), closes [Automattic/mongoose#3779](https://github.com/Automattic/mongoose/issues/3779)
575
+
576
+
577
+
578
+ <a name="2.0.0-rc2"></a>
579
+ ## 2.0.0-rc2 (2017-12-21)
580
+
581
+ * chore: release 2.0.0-rc2 ([76325fa](https://github.com/vkarpov15/kareem/commit/76325fa))
582
+ * fix: ensure next() and done() run in next tick ([6c20684](https://github.com/vkarpov15/kareem/commit/6c20684))
583
+
584
+
585
+
586
+ <a name="2.0.0-rc1"></a>
587
+ ## 2.0.0-rc1 (2017-12-21)
588
+
589
+ * chore: improve test coverage re: Automattic/mongoose#3232 ([7b45cf0](https://github.com/vkarpov15/kareem/commit/7b45cf0)), closes [Automattic/mongoose#3232](https://github.com/Automattic/mongoose/issues/3232)
590
+ * chore: release 2.0.0-rc1 ([9b83f52](https://github.com/vkarpov15/kareem/commit/9b83f52))
591
+ * BREAKING CHANGE: report sync exceptions as errors, only allow calling next() and done() once ([674adcc](https://github.com/vkarpov15/kareem/commit/674adcc)), closes [Automattic/mongoose#3483](https://github.com/Automattic/mongoose/issues/3483)
592
+
593
+
594
+
595
+ <a name="2.0.0-rc0"></a>
596
+ ## 2.0.0-rc0 (2017-12-17)
597
+
598
+ * chore: release 2.0.0-rc0 ([16b44b5](https://github.com/vkarpov15/kareem/commit/16b44b5))
599
+ * BREAKING CHANGE: drop support for node < 4 ([9cbb8c7](https://github.com/vkarpov15/kareem/commit/9cbb8c7))
600
+ * BREAKING CHANGE: remove useLegacyPost and add several new features ([6dd8531](https://github.com/vkarpov15/kareem/commit/6dd8531)), closes [Automattic/mongoose#3232](https://github.com/Automattic/mongoose/issues/3232)
601
+
602
+
603
+
604
+ <a name="1.5.0"></a>
605
+ ## 1.5.0 (2017-07-20)
606
+
607
+ * chore: release 1.5.0 ([9c491a0](https://github.com/vkarpov15/kareem/commit/9c491a0))
608
+ * fix: improve post error handlers results ([9928dd5](https://github.com/vkarpov15/kareem/commit/9928dd5)), closes [Automattic/mongoose#5466](https://github.com/Automattic/mongoose/issues/5466)
609
+
610
+
611
+
612
+ <a name="1.4.2"></a>
613
+ ## <small>1.4.2 (2017-07-06)</small>
614
+
615
+ * chore: release 1.4.2 ([8d14ac5](https://github.com/vkarpov15/kareem/commit/8d14ac5))
616
+ * fix: correct args re: Automattic/mongoose#5405 ([3f28ae6](https://github.com/vkarpov15/kareem/commit/3f28ae6)), closes [Automattic/mongoose#5405](https://github.com/Automattic/mongoose/issues/5405)
617
+
618
+
619
+
620
+ <a name="1.4.1"></a>
621
+ ## <small>1.4.1 (2017-04-25)</small>
622
+
623
+ * chore: release 1.4.1 ([5ecf0c2](https://github.com/vkarpov15/kareem/commit/5ecf0c2))
624
+ * fix: handle numAsyncPres with clone() ([c72e857](https://github.com/vkarpov15/kareem/commit/c72e857)), closes [#8](https://github.com/vkarpov15/kareem/issues/8)
625
+ * test: repro #8 ([9b4d6b2](https://github.com/vkarpov15/kareem/commit/9b4d6b2)), closes [#8](https://github.com/vkarpov15/kareem/issues/8)
626
+
627
+
628
+
629
+ <a name="1.4.0"></a>
630
+ ## 1.4.0 (2017-04-19)
631
+
632
+ * chore: release 1.4.0 ([101c5f5](https://github.com/vkarpov15/kareem/commit/101c5f5))
633
+ * feat: add merge() function ([285325e](https://github.com/vkarpov15/kareem/commit/285325e))
634
+
635
+
636
+
637
+ <a name="1.3.0"></a>
638
+ ## 1.3.0 (2017-03-26)
639
+
640
+ * chore: release 1.3.0 ([f3a9e50](https://github.com/vkarpov15/kareem/commit/f3a9e50))
641
+ * feat: pass function args to execPre ([4dd466d](https://github.com/vkarpov15/kareem/commit/4dd466d))
642
+
643
+
644
+
645
+ <a name="1.2.1"></a>
646
+ ## <small>1.2.1 (2017-02-03)</small>
647
+
648
+ * chore: release 1.2.1 ([d97081f](https://github.com/vkarpov15/kareem/commit/d97081f))
649
+ * fix: filter out _kareemIgnored args for error handlers re: Automattic/mongoose#4925 ([ddc7aeb](https://github.com/vkarpov15/kareem/commit/ddc7aeb)), closes [Automattic/mongoose#4925](https://github.com/Automattic/mongoose/issues/4925)
650
+ * fix: make error handlers handle errors in pre hooks ([af38033](https://github.com/vkarpov15/kareem/commit/af38033)), closes [Automattic/mongoose#4927](https://github.com/Automattic/mongoose/issues/4927)
651
+
652
+
653
+
654
+ <a name="1.2.0"></a>
655
+ ## 1.2.0 (2017-01-02)
656
+
657
+ * chore: release 1.2.0 ([033225c](https://github.com/vkarpov15/kareem/commit/033225c))
658
+ * chore: upgrade deps ([f9e9a09](https://github.com/vkarpov15/kareem/commit/f9e9a09))
659
+ * feat: add _kareemIgnore re: Automattic/mongoose#4836 ([7957771](https://github.com/vkarpov15/kareem/commit/7957771)), closes [Automattic/mongoose#4836](https://github.com/Automattic/mongoose/issues/4836)
660
+
661
+
662
+
663
+ <a name="1.1.5"></a>
664
+ ## <small>1.1.5 (2016-12-13)</small>
665
+
666
+ * chore: release 1.1.5 ([1a9f684](https://github.com/vkarpov15/kareem/commit/1a9f684))
667
+ * fix: correct field name ([04a0e9d](https://github.com/vkarpov15/kareem/commit/04a0e9d))
668
+
669
+
670
+
671
+ <a name="1.1.4"></a>
672
+ ## <small>1.1.4 (2016-12-09)</small>
673
+
674
+ * chore: release 1.1.4 ([ece401c](https://github.com/vkarpov15/kareem/commit/ece401c))
675
+ * chore: run tests on node 6 ([e0cb1cb](https://github.com/vkarpov15/kareem/commit/e0cb1cb))
676
+ * fix: only copy own properties in clone() ([dfe28ce](https://github.com/vkarpov15/kareem/commit/dfe28ce)), closes [#7](https://github.com/vkarpov15/kareem/issues/7)
677
+
678
+
679
+
680
+ <a name="1.1.3"></a>
681
+ ## <small>1.1.3 (2016-06-27)</small>
682
+
683
+ * chore: release 1.1.3 ([87171c8](https://github.com/vkarpov15/kareem/commit/87171c8))
684
+ * fix: couple more issues with arg processing ([c65f523](https://github.com/vkarpov15/kareem/commit/c65f523))
685
+
686
+
687
+
688
+ <a name="1.1.2"></a>
689
+ ## <small>1.1.2 (2016-06-27)</small>
690
+
691
+ * chore: release 1.1.2 ([8e102b6](https://github.com/vkarpov15/kareem/commit/8e102b6))
692
+ * fix: add early return ([4feda4e](https://github.com/vkarpov15/kareem/commit/4feda4e))
693
+
694
+
695
+
696
+ <a name="1.1.1"></a>
697
+ ## <small>1.1.1 (2016-06-27)</small>
698
+
699
+ * chore: release 1.1.1 ([8bb3050](https://github.com/vkarpov15/kareem/commit/8bb3050))
700
+ * fix: skip error handlers if no error ([0eb3a44](https://github.com/vkarpov15/kareem/commit/0eb3a44))
701
+
702
+
703
+
704
+ <a name="1.1.0"></a>
705
+ ## 1.1.0 (2016-05-11)
706
+
707
+ * chore: release 1.1.0 ([85332d9](https://github.com/vkarpov15/kareem/commit/85332d9))
708
+ * chore: test on node 4 and node 5 ([1faefa1](https://github.com/vkarpov15/kareem/commit/1faefa1))
709
+ * 100% coverage again ([c9aee4e](https://github.com/vkarpov15/kareem/commit/c9aee4e))
710
+ * add support for error post hooks ([d378113](https://github.com/vkarpov15/kareem/commit/d378113))
711
+ * basic setup for sync hooks #4 ([55aa081](https://github.com/vkarpov15/kareem/commit/55aa081)), closes [#4](https://github.com/vkarpov15/kareem/issues/4)
712
+ * proof of concept for error handlers ([e4a07d9](https://github.com/vkarpov15/kareem/commit/e4a07d9))
713
+ * refactor out handleWrapError helper ([b19af38](https://github.com/vkarpov15/kareem/commit/b19af38))
714
+
715
+
716
+
717
+ <a name="1.0.1"></a>
718
+ ## <small>1.0.1 (2015-05-10)</small>
719
+
720
+ * Fix #1 ([de60dc6](https://github.com/vkarpov15/kareem/commit/de60dc6)), closes [#1](https://github.com/vkarpov15/kareem/issues/1)
721
+ * release 1.0.1 ([6971088](https://github.com/vkarpov15/kareem/commit/6971088))
722
+ * Run tests on iojs in travis ([adcd201](https://github.com/vkarpov15/kareem/commit/adcd201))
723
+ * support legacy post hook behavior in wrap() ([23fa74c](https://github.com/vkarpov15/kareem/commit/23fa74c))
724
+ * Use node 0.12 in travis ([834689d](https://github.com/vkarpov15/kareem/commit/834689d))
725
+
726
+
727
+
728
+ <a name="1.0.0"></a>
729
+ ## 1.0.0 (2015-01-28)
730
+
731
+ * Tag 1.0.0 ([4c5a35a](https://github.com/vkarpov15/kareem/commit/4c5a35a))
732
+
733
+
734
+
735
+ <a name="0.0.8"></a>
736
+ ## <small>0.0.8 (2015-01-27)</small>
737
+
738
+ * Add clone function ([688bba7](https://github.com/vkarpov15/kareem/commit/688bba7))
739
+ * Add jscs for style checking ([5c93149](https://github.com/vkarpov15/kareem/commit/5c93149))
740
+ * Bump 0.0.8 ([03c0d2f](https://github.com/vkarpov15/kareem/commit/03c0d2f))
741
+ * Fix jscs config, add gulp rules ([9989abf](https://github.com/vkarpov15/kareem/commit/9989abf))
742
+ * fix Makefile typo ([1f7e61a](https://github.com/vkarpov15/kareem/commit/1f7e61a))
743
+
744
+
745
+
746
+ <a name="0.0.7"></a>
747
+ ## <small>0.0.7 (2015-01-04)</small>
748
+
749
+ * Bump 0.0.7 ([98ef173](https://github.com/vkarpov15/kareem/commit/98ef173))
750
+ * fix LearnBoost/mongoose#2553 - use null instead of undefined for err ([9157b48](https://github.com/vkarpov15/kareem/commit/9157b48)), closes [LearnBoost/mongoose#2553](https://github.com/LearnBoost/mongoose/issues/2553)
751
+ * Regenerate docs ([2331cdf](https://github.com/vkarpov15/kareem/commit/2331cdf))
752
+
753
+
754
+
755
+ <a name="0.0.6"></a>
756
+ ## <small>0.0.6 (2015-01-01)</small>
757
+
758
+ * Update docs and bump 0.0.6 ([92c12a7](https://github.com/vkarpov15/kareem/commit/92c12a7))
759
+
760
+
761
+
762
+ <a name="0.0.5"></a>
763
+ ## <small>0.0.5 (2015-01-01)</small>
764
+
765
+ * Add coverage rule to Makefile ([825a91c](https://github.com/vkarpov15/kareem/commit/825a91c))
766
+ * Add coveralls to README ([fb52369](https://github.com/vkarpov15/kareem/commit/fb52369))
767
+ * Add coveralls to travis ([93f6f15](https://github.com/vkarpov15/kareem/commit/93f6f15))
768
+ * Add createWrapper() function ([ea77741](https://github.com/vkarpov15/kareem/commit/ea77741))
769
+ * Add istanbul code coverage ([6eceeef](https://github.com/vkarpov15/kareem/commit/6eceeef))
770
+ * Add some more comments for examples ([c5b0c6f](https://github.com/vkarpov15/kareem/commit/c5b0c6f))
771
+ * Add travis ([e6dcb06](https://github.com/vkarpov15/kareem/commit/e6dcb06))
772
+ * Add travis badge to docs ([ad8c9b3](https://github.com/vkarpov15/kareem/commit/ad8c9b3))
773
+ * Add wrap() tests, 100% coverage ([6945be4](https://github.com/vkarpov15/kareem/commit/6945be4))
774
+ * Better test coverage for execPost ([d9ad539](https://github.com/vkarpov15/kareem/commit/d9ad539))
775
+ * Bump 0.0.5 ([69875b1](https://github.com/vkarpov15/kareem/commit/69875b1))
776
+ * Docs fix ([15b7098](https://github.com/vkarpov15/kareem/commit/15b7098))
777
+ * Fix silly mistake in docs generation ([50373eb](https://github.com/vkarpov15/kareem/commit/50373eb))
778
+ * Fix typo in readme ([fec4925](https://github.com/vkarpov15/kareem/commit/fec4925))
779
+ * Linkify travis badge ([92b25fe](https://github.com/vkarpov15/kareem/commit/92b25fe))
780
+ * Make travis run coverage ([747157b](https://github.com/vkarpov15/kareem/commit/747157b))
781
+ * Move travis status badge ([d52e89b](https://github.com/vkarpov15/kareem/commit/d52e89b))
782
+ * Quick fix for coverage ([50bbddb](https://github.com/vkarpov15/kareem/commit/50bbddb))
783
+ * Typo fix ([adea794](https://github.com/vkarpov15/kareem/commit/adea794))
784
+
785
+
786
+
787
+ <a name="0.0.4"></a>
788
+ ## <small>0.0.4 (2014-12-13)</small>
789
+
790
+ * Bump 0.0.4, run docs generation ([51a15fe](https://github.com/vkarpov15/kareem/commit/51a15fe))
791
+ * Use correct post parameters in wrap() ([9bb5da3](https://github.com/vkarpov15/kareem/commit/9bb5da3))
792
+
793
+
794
+
795
+ <a name="0.0.3"></a>
796
+ ## <small>0.0.3 (2014-12-12)</small>
797
+
798
+ * Add npm test script, fix small bug with args not getting passed through post ([49e3e68](https://github.com/vkarpov15/kareem/commit/49e3e68))
799
+ * Bump 0.0.3 ([65621d8](https://github.com/vkarpov15/kareem/commit/65621d8))
800
+ * Update readme ([901388b](https://github.com/vkarpov15/kareem/commit/901388b))
801
+
802
+
803
+
804
+ <a name="0.0.2"></a>
805
+ ## <small>0.0.2 (2014-12-12)</small>
806
+
807
+ * Add github repo and bump 0.0.2 ([59db8be](https://github.com/vkarpov15/kareem/commit/59db8be))
808
+
809
+
810
+
811
+ <a name="0.0.1"></a>
812
+ ## <small>0.0.1 (2014-12-12)</small>
813
+
814
+ * Add basic docs ([ad29ea4](https://github.com/vkarpov15/kareem/commit/ad29ea4))
815
+ * Add pre hooks ([2ffc356](https://github.com/vkarpov15/kareem/commit/2ffc356))
816
+ * Add wrap function ([68c540c](https://github.com/vkarpov15/kareem/commit/68c540c))
817
+ * Bump to version 0.0.1 ([a4bfd68](https://github.com/vkarpov15/kareem/commit/a4bfd68))
818
+ * Initial commit ([4002458](https://github.com/vkarpov15/kareem/commit/4002458))
819
+ * Initial deposit ([98fc489](https://github.com/vkarpov15/kareem/commit/98fc489))
820
+ * Post hooks ([395b67c](https://github.com/vkarpov15/kareem/commit/395b67c))
821
+ * Some basic setup work ([82df75e](https://github.com/vkarpov15/kareem/commit/82df75e))
822
+ * Support sync pre hooks ([1cc1b9f](https://github.com/vkarpov15/kareem/commit/1cc1b9f))
823
+ * Update package.json description ([978da18](https://github.com/vkarpov15/kareem/commit/978da18))
package/SECURITY.md ADDED
@@ -0,0 +1,5 @@
1
+ ## Security contact information
2
+
3
+ To report a security vulnerability, please use the
4
+ [Tidelift security contact](https://tidelift.com/security).
5
+ Tidelift will coordinate the fix and disclosure.
package/index.d.ts ADDED
@@ -0,0 +1,29 @@
1
+ declare module "kareem" {
2
+ export default class Kareem {
3
+ static skipWrappedFunction(): SkipWrappedFunction;
4
+ static overwriteMiddlewareResult(): OverwriteMiddlewareResult;
5
+
6
+ pre(name: string | RegExp, fn: Function): this;
7
+ pre(name: string | RegExp, options: Record<string, any>, fn: Function, error?: any, unshift?: boolean): this;
8
+ post(name: string | RegExp, fn: Function): this;
9
+ post(name: string | RegExp, options: Record<string, any>, fn: Function, unshift?: boolean): this;
10
+
11
+ clone(): Kareem;
12
+ merge(other: Kareem, clone?: boolean): this;
13
+
14
+ createWrapper(name: string, fn: Function, context?: any, options?: Record<string, any>): Function;
15
+ createWrapperSync(name: string, fn: Function): Function;
16
+ hasHooks(name: string): boolean;
17
+ filter(fn: Function): Kareem;
18
+
19
+ wrap(name: string, fn: Function, context: any, args: any[], options?: Record<string, any>): Function;
20
+
21
+ execPostSync(name: string, context: any, args: any[]): any;
22
+ execPost(name: string, context: any, args: any[], options?: Record<string, any>, callback?: Function): void;
23
+ execPreSync(name: string, context: any, args: any[]): any;
24
+ execPre(name: string, context: any, args: any[], callback?: Function): void;
25
+ }
26
+
27
+ class SkipWrappedFunction {}
28
+ class OverwriteMiddlewareResult {}
29
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kareem",
3
- "version": "2.6.1",
3
+ "version": "2.6.2",
4
4
  "description": "Next-generation take on pre/post function hooks",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -22,9 +22,6 @@
22
22
  },
23
23
  "author": "Valeri Karpov <val@karpov.io>",
24
24
  "license": "Apache-2.0",
25
- "files": [
26
- "index.js"
27
- ],
28
25
  "engines": {
29
26
  "node": ">=12.0.0"
30
27
  }