Skip to content

Commit 9838da5

Browse files
committed
JS: Simplify isExported
1 parent a3dc19f commit 9838da5

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

javascript/ql/lib/semmle/javascript/endpoints/EndpointNaming.qll

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,7 @@ private predicate relevantEdge(API::Node pred, API::Node succ) {
4747
private int distanceFromPackageExport(API::Node nd) =
4848
shortestDistances(isPackageExport/1, relevantEdge/2)(_, nd, result)
4949

50-
private predicate isExported(API::Node node) {
51-
isPackageExport(node)
52-
or
53-
exists(API::Node pred |
54-
isExported(pred) and
55-
relevantEdge(pred, node)
56-
)
57-
}
50+
private predicate isExported(API::Node node) { exists(distanceFromPackageExport(node)) }
5851

5952
/**
6053
* Holds if `node` is a default export that can be reinterpreted as a namespace export,

0 commit comments

Comments
 (0)