You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: workspaces/js-x-ray/docs/CollectableSet.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,10 @@
1
1
# CollectableSet
2
2
3
-
CollectableSet is a specialized data structure for collecting and aggregating infrastructure-related data points (e.g., URLs, hostnames, IPs) during JavaScript AST analysis. It groups locations by value and file, with optional metadata support. Post-analysis, the collected data can be exploited externally (e.g., for network monitoring, security audits, or infrastructure mapping) to derive insights beyond JS-X-Ray's built-in warnings.
3
+
CollectableSet is a specialized data structure for collecting and aggregating infrastructure-related data points (e.g., URLs, hostnames, IPs, dependencies) during JavaScript AST analysis. It groups locations by value and file, with optional metadata support. Post-analysis, the collected data can be exploited externally (e.g., for network monitoring, security audits, or infrastructure mapping) to derive insights beyond JS-X-Ray's built-in warnings.
4
4
5
5
-**type**: Type
6
6
-**add(value, infos)**: Adds an entry to the set. Groups by value and file.
7
+
-**values()**: Returns an iterable of all values of the CollectableSet.
7
8
8
9
CollectableSet is only an interface but Js-X-Ray provides a default implementation named DefaultCollectableSet.
9
10
The default implementation has an additional method to read what it has collected.
@@ -35,7 +36,7 @@ for (const { value, locations } of hostnameSet) {
0 commit comments