Whether this shared hook applies to target.
target
bool appliesTo(String target) => all || (hookTargets?.contains(target) ?? false);