@@ -42,7 +42,7 @@ PackageJSON getTopmostPackageJSON() {
42
42
* Gets a value exported by the main module from one of the topmost `package.json` files (see `getTopmostPackageJSON`).
43
43
* The value is either directly the `module.exports` value, a nested property of `module.exports`, or a method on an exported class.
44
44
*/
45
- DataFlow:: Node getAValueExportedByPackage ( ) {
45
+ private DataFlow:: Node getAValueExportedByPackage ( ) {
46
46
result = getAnExportFromModule ( getTopmostPackageJSON ( ) .getMainModule ( ) )
47
47
or
48
48
result = getAValueExportedByPackage ( ) .( DataFlow:: PropWrite ) .getRhs ( )
@@ -72,7 +72,7 @@ DataFlow::Node getAValueExportedByPackage() {
72
72
)
73
73
or
74
74
// *****
75
- // Various standard library methods for transforming exported objects.
75
+ // Common styles of transforming exported objects.
76
76
// *****
77
77
//
78
78
// Object.defineProperties
@@ -96,7 +96,7 @@ DataFlow::Node getAValueExportedByPackage() {
96
96
.getAReturn ( )
97
97
)
98
98
or
99
- // Object.assign
99
+ // Object.assign and friends
100
100
exists ( ExtendCall assign |
101
101
getAValueExportedByPackage ( ) = [ assign , assign .getDestinationOperand ( ) ] and
102
102
result = assign .getASourceOperand ( )
@@ -113,7 +113,7 @@ DataFlow::Node getAValueExportedByPackage() {
113
113
result = map .getReceiver ( )
114
114
)
115
115
or
116
- // Object.{fromEntries, freeze, entries, values}
116
+ // Object.{fromEntries, freeze, seal, entries, values}
117
117
exists ( DataFlow:: MethodCallNode freeze |
118
118
freeze =
119
119
DataFlow:: globalVarRef ( "Object" )
0 commit comments