For pipes, this PR added support for a pure/impure distinction, where pure pipes (e.g. NumberPipe) would only trigger on changed values, whereas impure pipes (e.g. JsonPipe) would always trigger.
I'd like a similar distinction for directives (which are currently always considered pure), and in case PRs for this would be welcomed, have tried to make an initial implementation.