I have some code including ES7 decorators parsed by acorn-es7.
ClassDeclaration.decorators is not always present, so caching the keys means that the decorator node is skipped unless the first class encountered happens to have a decorator.
The filter isn't really necessary given the check for value.type later, so removing the cache shouldn't have much of a performance impact.
I have some code including ES7 decorators parsed by acorn-es7.
ClassDeclaration.decorators is not always present, so caching the keys means that the decorator node is skipped unless the first class encountered happens to have a decorator.
The filter isn't really necessary given the check for value.type later, so removing the cache shouldn't have much of a performance impact.