forked from github/codeql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplainfn.js
More file actions
24 lines (20 loc) · 684 Bytes
/
plainfn.js
File metadata and controls
24 lines (20 loc) · 684 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
function Hello(props) { // $ threatModelSource=view-component-input
return <div>Hello {props.name}</div>;
} // $ reactComponent
function Hello2(props) { // $ threatModelSource=view-component-input
return React.createElement("div");
} // $ reactComponent
function Hello3(props) { // $ threatModelSource=view-component-input
var x = React.createElement("div");
return x;
} // $ reactComponent
function NotAComponent(props) {
if (y)
return React.createElement("div");
return g();
}
function SpuriousComponent(props) { // $ threatModelSource=view-component-input
if (y)
return React.createElement("div");
return 42;
} // $ reactComponent