Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6ce9c80

Browse filesBrowse files
joeyespocjihrig
authored andcommitted
doc: remove extra spaces and concats in examples
PR-URL: #7885 Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent ccfa6bf commit 6ce9c80
Copy full SHA for 6ce9c80

File tree

Expand file treeCollapse file tree

7 files changed

+14
-14
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

7 files changed

+14
-14
lines changed
Open diff view settings
Collapse file

‎doc/api/addons.md‎

Copy file name to clipboardExpand all lines: doc/api/addons.md
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ const addon = require('./build/Release/addon');
423423
424424
var obj1 = addon('hello');
425425
var obj2 = addon('world');
426-
console.log(obj1.msg + ' ' + obj2.msg); // 'hello world'
426+
console.log(obj1.msg, obj2.msg); // 'hello world'
427427
```
428428

429429

Collapse file

‎doc/api/child_process.md‎

Copy file name to clipboardExpand all lines: doc/api/child_process.md
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ const spawn = require('child_process').spawn;
832832

833833
let child = spawn('sh', ['-c',
834834
`node -e "setInterval(() => {
835-
console.log(process.pid + 'is alive')
835+
console.log(process.pid, 'is alive')
836836
}, 500);"`
837837
], {
838838
stdio: ['inherit', 'inherit', 'inherit']
Collapse file

‎doc/api/console.md‎

Copy file name to clipboardExpand all lines: doc/api/console.md
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ values similar to `printf(3)` (the arguments are all passed to
220220
var count = 5;
221221
console.log('count: %d', count);
222222
// Prints: count: 5, to stdout
223-
console.log('count: ', count);
223+
console.log('count:', count);
224224
// Prints: count: 5, to stdout
225225
```
226226

Collapse file

‎doc/api/https.md‎

Copy file name to clipboardExpand all lines: doc/api/https.md
+4-4Lines changed: 4 additions & 4 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ Example:
107107
const https = require('https');
108108

109109
https.get('https://encrypted.google.com/', (res) => {
110-
console.log('statusCode: ', res.statusCode);
111-
console.log('headers: ', res.headers);
110+
console.log('statusCode:', res.statusCode);
111+
console.log('headers:', res.headers);
112112

113113
res.on('data', (d) => {
114114
process.stdout.write(d);
@@ -151,8 +151,8 @@ var options = {
151151
};
152152

153153
var req = https.request(options, (res) => {
154-
console.log('statusCode: ', res.statusCode);
155-
console.log('headers: ', res.headers);
154+
console.log('statusCode:', res.statusCode);
155+
console.log('headers:', res.headers);
156156

157157
res.on('data', (d) => {
158158
process.stdout.write(d);
Collapse file

‎doc/api/modules.md‎

Copy file name to clipboardExpand all lines: doc/api/modules.md
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The contents of `foo.js`:
1212

1313
```js
1414
const circle = require('./circle.js');
15-
console.log( `The area of a circle of radius 4 is ${circle.area(4)}`);
15+
console.log(`The area of a circle of radius 4 is ${circle.area(4)}`);
1616
```
1717

1818
The contents of `circle.js`:
Collapse file

‎doc/api/process.md‎

Copy file name to clipboardExpand all lines: doc/api/process.md
+2-2Lines changed: 2 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,8 @@ For example:
223223

224224
```js
225225
process.on('unhandledRejection', (reason, p) => {
226-
console.log("Unhandled Rejection at: Promise ", p, " reason: ", reason);
227-
// application specific logging, throwing an error, or other logic here
226+
console.log('Unhandled Rejection at: Promise', p, 'reason:', reason);
227+
// application specific logging, throwing an error, or other logic here
228228
});
229229

230230
somePromise.then((res) => {
Collapse file

‎doc/api/vm.md‎

Copy file name to clipboardExpand all lines: doc/api/vm.md
+4-4Lines changed: 4 additions & 4 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -376,12 +376,12 @@ const vm = require('vm');
376376
var localVar = 'initial value';
377377

378378
const vmResult = vm.runInThisContext('localVar = "vm";');
379-
console.log('vmResult: ', vmResult);
380-
console.log('localVar: ', localVar);
379+
console.log('vmResult:', vmResult);
380+
console.log('localVar:', localVar);
381381

382382
const evalResult = eval('localVar = "eval";');
383-
console.log('evalResult: ', evalResult);
384-
console.log('localVar: ', localVar);
383+
console.log('evalResult:', evalResult);
384+
console.log('localVar:', localVar);
385385

386386
// vmResult: 'vm', localVar: 'initial value'
387387
// evalResult: 'eval', localVar: 'eval'

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.