In this case, it'd be totally useless because nothing is being passed to the function. No this or argument. Which implies its scope and this are already bound. If you had a filter string, what would it be filtering against? There's no context.
For your scenario to be valid, the parent comment needed to be something like: typeof fn === "function" && fn.call(ctx) or typeof fn === "function" && fn(ctx)
1
u/oguz279 Nov 10 '20
I prefer typeof fn === "function" && fn() as it covers cases where fn would have a truthy value but not be a function.