| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 452928e commit efd33a2
14 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -470,7 +470,7 @@ exports.fail = function(msg) { | |||
| 470 | 470 | // A stream to push an array into a REPL | |
| 471 | 471 | function ArrayStream() { | |
| 472 | 472 | this.run = function(data) { | |
| 473 | - data.forEach(line => { | ||
| 473 | + data.forEach((line) => { | ||
| 474 | 474 | this.emit('data', line + '\n'); | |
| 475 | 475 | }); | |
| 476 | 476 | }; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -485,7 +485,7 @@ testBlockTypeError(assert.throws, undefined); | |||
| 485 | 485 | testBlockTypeError(assert.doesNotThrow, undefined); | |
| 486 | 486 | ||
| 487 | 487 | // https://github.com/nodejs/node/issues/3275 | |
| 488 | - assert.throws(() => { throw 'error'; }, err => err === 'error'); | ||
| 489 | - assert.throws(() => { throw new Error(); }, err => err instanceof Error); | ||
| 488 | + assert.throws(() => { throw 'error'; }, (err) => err === 'error'); | ||
| 489 | + assert.throws(() => { throw new Error(); }, (err) => err instanceof Error); | ||
| 490 | 490 | ||
| 491 | 491 | console.log('All OK'); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,7 +20,7 @@ keyList.splice(0, 1); | |||
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | 22 | function init(id) { | |
| 23 | - keyList = keyList.filter(e => e != pkeys[id]); | ||
| 23 | + keyList = keyList.filter((e) => e != pkeys[id]); | ||
| 24 | 24 | } | |
| 25 | 25 | ||
| 26 | 26 | function noop() { } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -26,7 +26,7 @@ let echoOutput = ''; | |||
| 26 | 26 | ||
| 27 | 27 | assert.strictEqual(echo.spawnargs[echo.spawnargs.length - 1].replace(/"/g, ''), | |
| 28 | 28 | 'echo foo'); | |
| 29 | - echo.stdout.on('data', data => { | ||
| 29 | + echo.stdout.on('data', (data) => { | ||
| 30 | 30 | echoOutput += data; | |
| 31 | 31 | }); | |
| 32 | 32 | echo.on('close', common.mustCall((code, signal) => { | |
@@ -41,7 +41,7 @@ const command = cp.spawn(cmd, { | |||
| 41 | 41 | }); | |
| 42 | 42 | let commandOutput = ''; | |
| 43 | 43 | ||
| 44 | - command.stdout.on('data', data => { | ||
| 44 | + command.stdout.on('data', (data) => { | ||
| 45 | 45 | commandOutput += data; | |
| 46 | 46 | }); | |
| 47 | 47 | command.on('close', common.mustCall((code, signal) => { | |
@@ -56,7 +56,7 @@ const env = cp.spawn(`"${process.execPath}" -pe process.env.BAZ`, { | |||
| 56 | 56 | }); | |
| 57 | 57 | let envOutput = ''; | |
| 58 | 58 | ||
| 59 | - env.stdout.on('data', data => { | ||
| 59 | + env.stdout.on('data', (data) => { | ||
| 60 | 60 | envOutput += data; | |
| 61 | 61 | }); | |
| 62 | 62 | env.on('close', common.mustCall((code, signal) => { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -31,7 +31,7 @@ if (cluster.isMaster) { | |||
| 31 | 31 | // scanner but is ignored by atoi(3). Heinous hack. | |
| 32 | 32 | cluster.setupMaster({ execArgv: [`--debug=${common.PORT}.`] }); | |
| 33 | 33 | const worker = cluster.fork(); | |
| 34 | - worker.on('message', common.mustCall(message => { | ||
| 34 | + worker.on('message', common.mustCall((message) => { | ||
| 35 | 35 | assert.strictEqual(Array.isArray(message), true); | |
| 36 | 36 | assert.strictEqual(message[0], 'listening'); | |
| 37 | 37 | let continueRecv = false; | |
@@ -40,9 +40,9 @@ if (cluster.isMaster) { | |||
| 40 | 40 | const debugClient = net.connect({ host, port: common.PORT }); | |
| 41 | 41 | const protocol = new Protocol(); | |
| 42 | 42 | debugClient.setEncoding('utf8'); | |
| 43 | - debugClient.on('data', data => protocol.execute(data)); | ||
| 43 | + debugClient.on('data', (data) => protocol.execute(data)); | ||
| 44 | 44 | debugClient.once('connect', common.mustCall(() => { | |
| 45 | - protocol.onResponse = common.mustCall(res => { | ||
| 45 | + protocol.onResponse = common.mustCall((res) => { | ||
| 46 | 46 | protocol.onResponse = (res) => { | |
| 47 | 47 | // It can happen that the first continue was sent before the break | |
| 48 | 48 | // event was received. If that's the case, send also a continue from | |
@@ -85,7 +85,7 @@ if (cluster.isMaster) { | |||
| 85 | 85 | throw ex; | |
| 86 | 86 | }); | |
| 87 | 87 | } else { | |
| 88 | - const server = net.createServer(socket => socket.pipe(socket)); | ||
| 88 | + const server = net.createServer((socket) => socket.pipe(socket)); | ||
| 89 | 89 | const cb = () => { | |
| 90 | 90 | process.send(['listening', server.address()]); | |
| 91 | 91 | debugger; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -17,7 +17,7 @@ proc.on('exit', common.mustCall((exitCode, signalCode) => { | |||
| 17 | 17 | })); | |
| 18 | 18 | let stdout = ''; | |
| 19 | 19 | proc.stdout.setEncoding('utf8'); | |
| 20 | - proc.stdout.on('data', data => stdout += data); | ||
| 20 | + proc.stdout.on('data', (data) => stdout += data); | ||
| 21 | 21 | process.on('exit', () => { | |
| 22 | 22 | assert(stdout.includes('Promise { 42 }')); | |
| 23 | 23 | assert(stdout.includes('Promise { 1337 }')); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,7 +15,7 @@ const child = spawn(process.execPath, args); | |||
| 15 | 15 | child.stderr.setEncoding('utf8'); | |
| 16 | 16 | ||
| 17 | 17 | let stderr = ''; | |
| 18 | - child.stderr.on('data', data => { | ||
| 18 | + child.stderr.on('data', (data) => { | ||
| 19 | 19 | stderr += data; | |
| 20 | 20 | if (child.killed !== true && stderr.includes('all workers are running')) | |
| 21 | 21 | child.kill(); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -13,7 +13,7 @@ var conns = 0; | |||
| 13 | 13 | var clientLocalPorts = []; | |
| 14 | 14 | var serverRemotePorts = []; | |
| 15 | 15 | const client = new net.Socket(); | |
| 16 | - const server = net.createServer(socket => { | ||
| 16 | + const server = net.createServer((socket) => { | ||
| 17 | 17 | serverRemotePorts.push(socket.remotePort); | |
| 18 | 18 | socket.end(); | |
| 19 | 19 | }); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,15 +3,15 @@ const common = require('../common'); | |||
| 3 | 3 | const assert = require('assert'); | |
| 4 | 4 | const sym = Symbol(); | |
| 5 | 5 | ||
| 6 | - process.on('normal', common.mustCall(data => { | ||
| 6 | + process.on('normal', common.mustCall((data) => { | ||
| 7 | 7 | assert.strictEqual(data, 'normalData'); | |
| 8 | 8 | })); | |
| 9 | 9 | ||
| 10 | - process.on(sym, common.mustCall(data => { | ||
| 10 | + process.on(sym, common.mustCall((data) => { | ||
| 11 | 11 | assert.strictEqual(data, 'symbolData'); | |
| 12 | 12 | })); | |
| 13 | 13 | ||
| 14 | - process.on('SIGPIPE', common.mustCall(data => { | ||
| 14 | + process.on('SIGPIPE', common.mustCall((data) => { | ||
| 15 | 15 | assert.strictEqual(data, 'signalData'); | |
| 16 | 16 | })); | |
| 17 | 17 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,7 +7,7 @@ const net = require('net'); | |||
| 7 | 7 | process.chdir(common.fixturesDir); | |
| 8 | 8 | const repl = require('repl'); | |
| 9 | 9 | ||
| 10 | - const server = net.createServer(conn => { | ||
| 10 | + const server = net.createServer((conn) => { | ||
| 11 | 11 | repl.start('', conn).on('exit', () => { | |
| 12 | 12 | conn.destroy(); | |
| 13 | 13 | server.close(); | |
@@ -22,7 +22,7 @@ var answer = ''; | |||
| 22 | 22 | server.listen(options, function() { | |
| 23 | 23 | const conn = net.connect(options); | |
| 24 | 24 | conn.setEncoding('utf8'); | |
| 25 | - conn.on('data', data => answer += data); | ||
| 25 | + conn.on('data', (data) => answer += data); | ||
| 26 | 26 | conn.write('require("baz")\n.exit\n'); | |
| 27 | 27 | }); | |
| 28 | 28 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments