-
-
Notifications
You must be signed in to change notification settings - Fork 101
Expand file tree
/
Copy pathscan-scenario.js
More file actions
46 lines (29 loc) · 753 Bytes
/
scan-scenario.js
File metadata and controls
46 lines (29 loc) · 753 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
'use strict';
const zlib = require('zlib');
let outerVar = 'outer variable';
exports.holder = {};
function closure() {
function Class() {
this.x = 1;
this.y = 123.456;
this.hashmap = {};
}
Class.prototype.method = function method() {
throw new Error('Uncaught');
};
const c = new Class();
let scopedVar = 'scoped value';
let scopedAPI = zlib.createDeflate()._handle;
let scopedArray = [0, scopedAPI];
exports.holder = scopedAPI;
c.hashmap.scoped = function name() {
return scopedVar + outerVar + scopedAPI + scopedArray;
};
function Class_B() {
this.my_class_b = "Class B";
}
const arr = new Array();
for (let i = 0; i < 10; i++) arr.push(new Class_B());
c.method();
}
closure();