* Checks whether this serializer middleware is lazy. * @template {LazyTarget} TLazyTarget * @param {EXPECTED_ANY} fn lazy function * @param {TLazyTarget=} target target middleware * @returns {fn is LazyFunction<EXPECTED_ANY, EXPECTED_ANY, TLazyTarget, EXPECTED_ANY>} true, when fn is a lazy f
(fn, target)
| 92 | * @returns {fn is LazyFunction<EXPECTED_ANY, EXPECTED_ANY, TLazyTarget, EXPECTED_ANY>} true, when fn is a lazy function (optionally of that target) |
| 93 | */ |
| 94 | static isLazy(fn, target) { |
| 95 | if (typeof fn !== "function") return false; |
| 96 | const t = fn[LAZY_TARGET]; |
| 97 | return target ? t === target : Boolean(t); |
| 98 | } |
| 99 | |
| 100 | /** |
| 101 | * Returns options. |
no outgoing calls
no test coverage detected