| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent c8d2ca7 commit b4cf8c4
42 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -51,10 +51,12 @@ function stripBOM(content) { | |||
| 51 | 51 | return content; | |
| 52 | 52 | } | |
| 53 | 53 | ||
| 54 | - exports.builtinLibs = ['assert', 'buffer', 'child_process', 'cluster', | ||
| 55 | - 'crypto', 'dgram', 'dns', 'domain', 'events', 'fs', 'http', 'https', 'net', | ||
| 56 | - 'os', 'path', 'punycode', 'querystring', 'readline', 'repl', 'stream', | ||
| 57 | - 'string_decoder', 'tls', 'tty', 'url', 'util', 'v8', 'vm', 'zlib']; | ||
| 54 | + exports.builtinLibs = [ | ||
| 55 | + 'assert', 'buffer', 'child_process', 'cluster', 'crypto', 'dgram', 'dns', | ||
| 56 | + 'domain', 'events', 'fs', 'http', 'https', 'net', 'os', 'path', 'punycode', | ||
| 57 | + 'querystring', 'readline', 'repl', 'stream', 'string_decoder', 'tls', 'tty', | ||
| 58 | + 'url', 'util', 'v8', 'vm', 'zlib' | ||
| 59 | + ]; | ||
| 58 | 60 | ||
| 59 | 61 | function addBuiltinLibsToObject(object) { | |
| 60 | 62 | // Make built-in modules available directly (loaded lazily). | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -39,13 +39,13 @@ const debug = util.debuglog('repl'); | |||
| 39 | 39 | const parentModule = module; | |
| 40 | 40 | const replMap = new WeakMap(); | |
| 41 | 41 | ||
| 42 | - const GLOBAL_OBJECT_PROPERTIES = ['NaN', 'Infinity', 'undefined', | ||
| 43 | - 'eval', 'parseInt', 'parseFloat', 'isNaN', 'isFinite', 'decodeURI', | ||
| 44 | - 'decodeURIComponent', 'encodeURI', 'encodeURIComponent', | ||
| 45 | - 'Object', 'Function', 'Array', 'String', 'Boolean', 'Number', | ||
| 46 | - 'Date', 'RegExp', 'Error', 'EvalError', 'RangeError', | ||
| 47 | - 'ReferenceError', 'SyntaxError', 'TypeError', 'URIError', | ||
| 48 | - 'Math', 'JSON']; | ||
| 42 | + const GLOBAL_OBJECT_PROPERTIES = [ | ||
| 43 | + 'NaN', 'Infinity', 'undefined', 'eval', 'parseInt', 'parseFloat', 'isNaN', | ||
| 44 | + 'isFinite', 'decodeURI', 'decodeURIComponent', 'encodeURI', | ||
| 45 | + 'encodeURIComponent', 'Object', 'Function', 'Array', 'String', 'Boolean', | ||
| 46 | + 'Number', 'Date', 'RegExp', 'Error', 'EvalError', 'RangeError', | ||
| 47 | + 'ReferenceError', 'SyntaxError', 'TypeError', 'URIError', 'Math', 'JSON' | ||
| 48 | + ]; | ||
| 49 | 49 | const GLOBAL_OBJECT_PROPERTY_MAP = {}; | |
| 50 | 50 | GLOBAL_OBJECT_PROPERTIES.forEach((p) => GLOBAL_OBJECT_PROPERTY_MAP[p] = p); | |
| 51 | 51 | ||
@@ -1215,12 +1215,13 @@ function addStandardGlobals(completionGroups, filter) { | |||
| 1215 | 1215 | // Common keywords. Exclude for completion on the empty string, b/c | |
| 1216 | 1216 | // they just get in the way. | |
| 1217 | 1217 | if (filter) { | |
| 1218 | - completionGroups.push(['break', 'case', 'catch', 'const', | ||
| 1219 | - 'continue', 'debugger', 'default', 'delete', 'do', 'else', | ||
| 1220 | - 'export', 'false', 'finally', 'for', 'function', 'if', | ||
| 1221 | - 'import', 'in', 'instanceof', 'let', 'new', 'null', 'return', | ||
| 1222 | - 'switch', 'this', 'throw', 'true', 'try', 'typeof', 'undefined', | ||
| 1223 | - 'var', 'void', 'while', 'with', 'yield']); | ||
| 1218 | + completionGroups.push([ | ||
| 1219 | + 'break', 'case', 'catch', 'const', 'continue', 'debugger', 'default', | ||
| 1220 | + 'delete', 'do', 'else', 'export', 'false', 'finally', 'for', 'function', | ||
| 1221 | + 'if', 'import', 'in', 'instanceof', 'let', 'new', 'null', 'return', | ||
| 1222 | + 'switch', 'this', 'throw', 'true', 'try', 'typeof', 'undefined', 'var', | ||
| 1223 | + 'void', 'while', 'with', 'yield' | ||
| 1224 | + ]); | ||
| 1224 | 1225 | } | |
| 1225 | 1226 | } | |
| 1226 | 1227 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -400,7 +400,7 @@ function formatValue(ctx, value, recurseTimes) { | |||
| 400 | 400 | if (keys.length === 0) { | |
| 401 | 401 | if (typeof value === 'function') { | |
| 402 | 402 | return ctx.stylize(`[Function${value.name ? `: ${value.name}` : ''}]`, | |
| 403 | - 'special'); | ||
| 403 | + 'special'); | ||
| 404 | 404 | } | |
| 405 | 405 | if (isRegExp(value)) { | |
| 406 | 406 | return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); | |
@@ -659,7 +659,7 @@ function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { | |||
| 659 | 659 | for (var i = 0; i < maxLength; ++i) { | |
| 660 | 660 | if (hasOwnProperty(value, String(i))) { | |
| 661 | 661 | output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, | |
| 662 | - String(i), true)); | ||
| 662 | + String(i), true)); | ||
| 663 | 663 | } else { | |
| 664 | 664 | output.push(''); | |
| 665 | 665 | } | |
@@ -670,7 +670,7 @@ function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { | |||
| 670 | 670 | keys.forEach(function(key) { | |
| 671 | 671 | if (typeof key === 'symbol' || !key.match(/^\d+$/)) { | |
| 672 | 672 | output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, | |
| 673 | - key, true)); | ||
| 673 | + key, true)); | ||
| 674 | 674 | } | |
| 675 | 675 | }); | |
| 676 | 676 | return output; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -114,10 +114,10 @@ function testSetBreakpointAndResume(session) { | |||
| 114 | 114 | const commands = [ | |
| 115 | 115 | { 'method': 'Debugger.setBreakpointByUrl', | |
| 116 | 116 | 'params': { 'lineNumber': 5, | |
| 117 | - 'url': session.mainScriptPath, | ||
| 118 | - 'columnNumber': 0, | ||
| 119 | - 'condition': '' | ||
| 120 | - } | ||
| 117 | + 'url': session.mainScriptPath, | ||
| 118 | + 'columnNumber': 0, | ||
| 119 | + 'condition': '' | ||
| 120 | + } | ||
| 121 | 121 | }, | |
| 122 | 122 | { 'method': 'Debugger.resume'}, | |
| 123 | 123 | [ { 'method': 'Debugger.getScriptSource', | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -36,61 +36,61 @@ function checkWrap(req) { | |||
| 36 | 36 | ||
| 37 | 37 | TEST(function test_resolve4(done) { | |
| 38 | 38 | const req = dns.resolve4('www.google.com', | |
| 39 | - common.mustCall((err, ips) => { | ||
| 40 | - assert.ifError(err); | ||
| 39 | + common.mustCall((err, ips) => { | ||
| 40 | + assert.ifError(err); | ||
| 41 | 41 | ||
| 42 | - assert.ok(ips.length > 0); | ||
| 42 | + assert.ok(ips.length > 0); | ||
| 43 | 43 | ||
| 44 | - for (let i = 0; i < ips.length; i++) { | ||
| 45 | - assert.ok(isIPv4(ips[i])); | ||
| 46 | - } | ||
| 44 | + for (let i = 0; i < ips.length; i++) { | ||
| 45 | + assert.ok(isIPv4(ips[i])); | ||
| 46 | + } | ||
| 47 | 47 | ||
| 48 | - done(); | ||
| 49 | - })); | ||
| 48 | + done(); | ||
| 49 | + })); | ||
| 50 | 50 | ||
| 51 | 51 | checkWrap(req); | |
| 52 | 52 | }); | |
| 53 | 53 | ||
| 54 | 54 | TEST(function test_reverse_ipv4(done) { | |
| 55 | 55 | const req = dns.reverse('8.8.8.8', | |
| 56 | - common.mustCall((err, domains) => { | ||
| 57 | - assert.ifError(err); | ||
| 56 | + common.mustCall((err, domains) => { | ||
| 57 | + assert.ifError(err); | ||
| 58 | 58 | ||
| 59 | - assert.ok(domains.length > 0); | ||
| 59 | + assert.ok(domains.length > 0); | ||
| 60 | 60 | ||
| 61 | - for (let i = 0; i < domains.length; i++) { | ||
| 62 | - assert.ok(domains[i]); | ||
| 63 | - assert.ok(typeof domains[i] === 'string'); | ||
| 64 | - } | ||
| 61 | + for (let i = 0; i < domains.length; i++) { | ||
| 62 | + assert.ok(domains[i]); | ||
| 63 | + assert.ok(typeof domains[i] === 'string'); | ||
| 64 | + } | ||
| 65 | 65 | ||
| 66 | - done(); | ||
| 67 | - })); | ||
| 66 | + done(); | ||
| 67 | + })); | ||
| 68 | 68 | ||
| 69 | 69 | checkWrap(req); | |
| 70 | 70 | }); | |
| 71 | 71 | ||
| 72 | 72 | TEST(function test_lookup_ipv4_explicit(done) { | |
| 73 | 73 | const req = dns.lookup('www.google.com', 4, | |
| 74 | - common.mustCall((err, ip, family) => { | ||
| 75 | - assert.ifError(err); | ||
| 76 | - assert.ok(net.isIPv4(ip)); | ||
| 77 | - assert.strictEqual(family, 4); | ||
| 74 | + common.mustCall((err, ip, family) => { | ||
| 75 | + assert.ifError(err); | ||
| 76 | + assert.ok(net.isIPv4(ip)); | ||
| 77 | + assert.strictEqual(family, 4); | ||
| 78 | 78 | ||
| 79 | - done(); | ||
| 80 | - })); | ||
| 79 | + done(); | ||
| 80 | + })); | ||
| 81 | 81 | ||
| 82 | 82 | checkWrap(req); | |
| 83 | 83 | }); | |
| 84 | 84 | ||
| 85 | 85 | TEST(function test_lookup_ipv4_implicit(done) { | |
| 86 | 86 | const req = dns.lookup('www.google.com', | |
| 87 | - common.mustCall((err, ip, family) => { | ||
| 88 | - assert.ifError(err); | ||
| 89 | - assert.ok(net.isIPv4(ip)); | ||
| 90 | - assert.strictEqual(family, 4); | ||
| 87 | + common.mustCall((err, ip, family) => { | ||
| 88 | + assert.ifError(err); | ||
| 89 | + assert.ok(net.isIPv4(ip)); | ||
| 90 | + assert.strictEqual(family, 4); | ||
| 91 | 91 | ||
| 92 | - done(); | ||
| 93 | - })); | ||
| 92 | + done(); | ||
| 93 | + })); | ||
| 94 | 94 | ||
| 95 | 95 | checkWrap(req); | |
| 96 | 96 | }); | |
@@ -125,26 +125,26 @@ TEST(function test_lookup_ipv4_hint_addrconfig(done) { | |||
| 125 | 125 | ||
| 126 | 126 | TEST(function test_lookup_ip_ipv4(done) { | |
| 127 | 127 | const req = dns.lookup('127.0.0.1', | |
| 128 | - common.mustCall((err, ip, family) => { | ||
| 129 | - assert.ifError(err); | ||
| 130 | - assert.strictEqual(ip, '127.0.0.1'); | ||
| 131 | - assert.strictEqual(family, 4); | ||
| 128 | + common.mustCall((err, ip, family) => { | ||
| 129 | + assert.ifError(err); | ||
| 130 | + assert.strictEqual(ip, '127.0.0.1'); | ||
| 131 | + assert.strictEqual(family, 4); | ||
| 132 | 132 | ||
| 133 | - done(); | ||
| 134 | - })); | ||
| 133 | + done(); | ||
| 134 | + })); | ||
| 135 | 135 | ||
| 136 | 136 | checkWrap(req); | |
| 137 | 137 | }); | |
| 138 | 138 | ||
| 139 | 139 | TEST(function test_lookup_localhost_ipv4(done) { | |
| 140 | 140 | const req = dns.lookup('localhost', 4, | |
| 141 | - common.mustCall((err, ip, family) => { | ||
| 142 | - assert.ifError(err); | ||
| 143 | - assert.strictEqual(ip, '127.0.0.1'); | ||
| 144 | - assert.strictEqual(family, 4); | ||
| 141 | + common.mustCall((err, ip, family) => { | ||
| 142 | + assert.ifError(err); | ||
| 143 | + assert.strictEqual(ip, '127.0.0.1'); | ||
| 144 | + assert.strictEqual(family, 4); | ||
| 145 | 145 | ||
| 146 | - done(); | ||
| 147 | - })); | ||
| 146 | + done(); | ||
| 147 | + })); | ||
| 148 | 148 | ||
| 149 | 149 | checkWrap(req); | |
| 150 | 150 | }); | |
@@ -164,21 +164,23 @@ TEST(function test_lookup_all_ipv4(done) { | |||
| 164 | 164 | }); | |
| 165 | 165 | ||
| 166 | 166 | done(); | |
| 167 | - } | ||
| 168 | - )); | ||
| 167 | + }) | ||
| 168 | + ); | ||
| 169 | 169 | ||
| 170 | 170 | checkWrap(req); | |
| 171 | 171 | }); | |
| 172 | 172 | ||
| 173 | 173 | TEST(function test_lookupservice_ip_ipv4(done) { | |
| 174 | - const req = dns.lookupService('127.0.0.1', 80, | ||
| 174 | + const req = dns.lookupService( | ||
| 175 | + '127.0.0.1', 80, | ||
| 175 | 176 | common.mustCall((err, host, service) => { | |
| 176 | 177 | assert.ifError(err); | |
| 177 | 178 | assert.strictEqual(typeof host, 'string'); | |
| 178 | 179 | assert(host); | |
| 179 | 180 | assert(['http', 'www', '80'].includes(service)); | |
| 180 | 181 | done(); | |
| 181 | - })); | ||
| 182 | + }) | ||
| 183 | + ); | ||
| 182 | 184 | ||
| 183 | 185 | checkWrap(req); | |
| 184 | 186 | }); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -41,45 +41,45 @@ function checkWrap(req) { | |||
| 41 | 41 | ||
| 42 | 42 | TEST(function test_resolve6(done) { | |
| 43 | 43 | const req = dns.resolve6('ipv6.google.com', | |
| 44 | - common.mustCall((err, ips) => { | ||
| 45 | - assert.ifError(err); | ||
| 44 | + common.mustCall((err, ips) => { | ||
| 45 | + assert.ifError(err); | ||
| 46 | 46 | ||
| 47 | - assert.ok(ips.length > 0); | ||
| 47 | + assert.ok(ips.length > 0); | ||
| 48 | 48 | ||
| 49 | - for (let i = 0; i < ips.length; i++) | ||
| 50 | - assert.ok(isIPv6(ips[i])); | ||
| 49 | + for (let i = 0; i < ips.length; i++) | ||
| 50 | + assert.ok(isIPv6(ips[i])); | ||
| 51 | 51 | ||
| 52 | - done(); | ||
| 53 | - })); | ||
| 52 | + done(); | ||
| 53 | + })); | ||
| 54 | 54 | ||
| 55 | 55 | checkWrap(req); | |
| 56 | 56 | }); | |
| 57 | 57 | ||
| 58 | 58 | TEST(function test_reverse_ipv6(done) { | |
| 59 | 59 | const req = dns.reverse('2001:4860:4860::8888', | |
| 60 | - common.mustCall((err, domains) => { | ||
| 61 | - assert.ifError(err); | ||
| 60 | + common.mustCall((err, domains) => { | ||
| 61 | + assert.ifError(err); | ||
| 62 | 62 | ||
| 63 | - assert.ok(domains.length > 0); | ||
| 63 | + assert.ok(domains.length > 0); | ||
| 64 | 64 | ||
| 65 | - for (let i = 0; i < domains.length; i++) | ||
| 66 | - assert.ok(typeof domains[i] === 'string'); | ||
| 65 | + for (let i = 0; i < domains.length; i++) | ||
| 66 | + assert.ok(typeof domains[i] === 'string'); | ||
| 67 | 67 | ||
| 68 | - done(); | ||
| 69 | - })); | ||
| 68 | + done(); | ||
| 69 | + })); | ||
| 70 | 70 | ||
| 71 | 71 | checkWrap(req); | |
| 72 | 72 | }); | |
| 73 | 73 | ||
| 74 | 74 | TEST(function test_lookup_ipv6_explicit(done) { | |
| 75 | 75 | const req = dns.lookup('ipv6.google.com', 6, | |
| 76 | - common.mustCall((err, ip, family) => { | ||
| 77 | - assert.ifError(err); | ||
| 78 | - assert.ok(isIPv6(ip)); | ||
| 79 | - assert.strictEqual(family, 6); | ||
| 76 | + common.mustCall((err, ip, family) => { | ||
| 77 | + assert.ifError(err); | ||
| 78 | + assert.ok(isIPv6(ip)); | ||
| 79 | + assert.strictEqual(family, 6); | ||
| 80 | 80 | ||
| 81 | - done(); | ||
| 82 | - })); | ||
| 81 | + done(); | ||
| 82 | + })); | ||
| 83 | 83 | ||
| 84 | 84 | checkWrap(req); | |
| 85 | 85 | }); | |
@@ -142,13 +142,13 @@ TEST(function test_lookup_ipv6_hint(done) { | |||
| 142 | 142 | ||
| 143 | 143 | TEST(function test_lookup_ip_ipv6(done) { | |
| 144 | 144 | const req = dns.lookup('::1', | |
| 145 | - common.mustCall((err, ip, family) => { | ||
| 146 | - assert.ifError(err); | ||
| 147 | - assert.ok(isIPv6(ip)); | ||
| 148 | - assert.strictEqual(family, 6); | ||
| 145 | + common.mustCall((err, ip, family) => { | ||
| 146 | + assert.ifError(err); | ||
| 147 | + assert.ok(isIPv6(ip)); | ||
| 148 | + assert.strictEqual(family, 6); | ||
| 149 | 149 | ||
| 150 | - done(); | ||
| 151 | - })); | ||
| 150 | + done(); | ||
| 151 | + })); | ||
| 152 | 152 | ||
| 153 | 153 | checkWrap(req); | |
| 154 | 154 | }); | |
@@ -169,14 +169,15 @@ TEST(function test_lookup_all_ipv6(done) { | |||
| 169 | 169 | }); | |
| 170 | 170 | ||
| 171 | 171 | done(); | |
| 172 | - } | ||
| 173 | - )); | ||
| 172 | + }) | ||
| 173 | + ); | ||
| 174 | 174 | ||
| 175 | 175 | checkWrap(req); | |
| 176 | 176 | }); | |
| 177 | 177 | ||
| 178 | 178 | TEST(function test_lookupservice_ip_ipv6(done) { | |
| 179 | - const req = dns.lookupService('::1', 80, | ||
| 179 | + const req = dns.lookupService( | ||
| 180 | + '::1', 80, | ||
| 180 | 181 | common.mustCall((err, host, service) => { | |
| 181 | 182 | if (err) { | |
| 182 | 183 | // Not skipping the test, rather checking an alternative result, | |
@@ -188,7 +189,8 @@ TEST(function test_lookupservice_ip_ipv6(done) { | |||
| 188 | 189 | assert(host); | |
| 189 | 190 | assert(['http', 'www', '80'].includes(service)); | |
| 190 | 191 | done(); | |
| 191 | - })); | ||
| 192 | + }) | ||
| 193 | + ); | ||
| 192 | 194 | ||
| 193 | 195 | checkWrap(req); | |
| 194 | 196 | }); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments