forked from nodejs/node
-
Notifications
You must be signed in to change notification settings - Fork 2
/
globals.js
73 lines (73 loc) · 1.38 KB
/
globals.js
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/* eslint-disable no-restricted-globals */
'use strict';
module.exports = Object.create(null);
for (var name of [
// generated from:
//
// ./node tools/eslint/bin/eslint.js \
// --rulesdir=tools/eslint-rules \
// --format=tap lib |
// tr -s ' ' |
// grep -- '- message: Unexpected use of ' |
// sort |
// uniq |
// cut -d ' ' -f7
'Array',
'ArrayBuffer',
'Boolean',
'DTRACE_HTTP_CLIENT_REQUEST',
'DTRACE_HTTP_CLIENT_RESPONSE',
'DTRACE_HTTP_SERVER_REQUEST',
'DTRACE_HTTP_SERVER_RESPONSE',
'DTRACE_NET_SERVER_CONNECTION',
'DTRACE_NET_STREAM_END',
'Date',
'Error',
'Float32Array',
'Float64Array',
'Function',
'Infinity',
'Intl',
'JSON',
'Map',
'Math',
'Number',
'Object',
'RangeError',
'Reflect',
'RegExp',
'String',
'Symbol',
'SyntaxError',
'TypeError',
'URIError',
'Uint32Array',
'Uint8Array',
'WeakMap',
'clearTimeout',
'console',
'decodeURIComponent',
'eval',
'global',
'isFinite',
'isNaN',
'parseFloat',
'parseInt',
'process',
'setImmediate',
'setTimeout'
]) {
let root = global;
let desc;
try {
while (desc === undefined) {
desc = Object.getOwnPropertyDescriptor(root, name);
root = Object.getPrototypeOf(root);
}
Object.defineProperty(module.exports, name, desc);
}
catch (e) {
throw new Error(`cannot find ${name}`);
}
}
Object.freeze(module.exports);