(fn)
| 317 | }; |
| 318 | }; |
| 319 | var contextual = function contextual(fn) { |
| 320 | var check = true; |
| 321 | var context = null; |
| 322 | var augmented = augmentor(function () { |
| 323 | return fn.apply(context, arguments); |
| 324 | }); |
| 325 | return function hook() { |
| 326 | var result = augmented.apply(context = this, arguments); // perform hasEffect check only once |
| 327 | |
| 328 | if (check) { |
| 329 | check = !check; // and copy same Array if any FX was used |
| 330 | |
| 331 | if (hasEffect(augmented)) effects.set(hook, effects.get(augmented)); |
| 332 | } |
| 333 | |
| 334 | return result; |
| 335 | }; |
| 336 | }; // useReducer |
| 337 | |
| 338 | var updates = umap(new WeakMap()); |
| 339 |
nothing calls this directly
no test coverage detected