@@ -57,19 +57,6 @@ class NodeModule extends Module {
5757 result .getAValue ( ) = this .getAModuleExportsValue ( )
5858 }
5959
60- /** Gets a symbol exported by this module. */
61- override string getAnExportedSymbol ( ) {
62- result = super .getAnExportedSymbol ( )
63- or
64- result = this .getAnImplicitlyExportedSymbol ( )
65- or
66- // getters and the like.
67- exists ( DataFlow:: PropWrite pwn |
68- pwn .getBase ( ) = this .getAModuleExportsNode ( ) and
69- result = pwn .getPropertyName ( )
70- )
71- }
72-
7360 override DataFlow:: Node getAnExportedValue ( string name ) {
7461 // a property write whose base is `exports` or `module.exports`
7562 exists ( DataFlow:: PropWrite pwn | result = pwn .getRhs ( ) |
@@ -123,29 +110,6 @@ class NodeModule extends Module {
123110 )
124111 }
125112
126- /** Gets a symbol that the module object inherits from its prototypes. */
127- private string getAnImplicitlyExportedSymbol ( ) {
128- exists ( ExternalConstructor ec | ec = this .getPrototypeOfExportedExpr ( ) |
129- result = ec .getAMember ( ) .getName ( )
130- or
131- ec instanceof FunctionExternal and result = "prototype"
132- or
133- ec instanceof ArrayExternal and
134- exists ( NumberLiteral nl | result = nl .getValue ( ) and exists ( result .toInt ( ) ) )
135- )
136- }
137-
138- /** Gets an externs declaration of the prototype object of a value exported by this module. */
139- private ExternalConstructor getPrototypeOfExportedExpr ( ) {
140- exists ( AbstractValue exported | exported = this .getAModuleExportsValue ( ) |
141- result instanceof ObjectExternal
142- or
143- exported instanceof AbstractFunction and result instanceof FunctionExternal
144- or
145- exported instanceof AbstractOtherObject and result instanceof ArrayExternal
146- )
147- }
148-
149113 deprecated override predicate searchRoot ( PathExpr path , Folder searchRoot , int priority ) {
150114 path .getEnclosingModule ( ) = this and
151115 exists ( string pathval | pathval = path .getValue ( ) |
0 commit comments