Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
f25c7ce
win,msi: Added Italian translation
mcollina Jan 12, 2016
9db861b
tools: increase lint coverage
Trott Jul 10, 2016
25b3ff4
test,doc: clarify `buf.indexOf(num)` input range
addaleax Jul 8, 2016
45a8fce
doc: fix typo in the CHANGELOG_V6
vsemozhetbyt Jul 6, 2016
8bbb3eb
tools: consistent .eslintrc formatting
silverwind Jul 12, 2016
e1e477e
win,msi: add zh-CN translations for the installer
pmq20 Jul 14, 2016
43b5bf4
inspector: Unify event queues
Jun 1, 2016
ccd4983
test: add common.rootDir
cjihrig Jul 12, 2016
f003465
fs: rename event to eventType in fs.watch listener
claudiorodriguez Jul 1, 2016
1af8c03
test: cleanup IIFE tests
cjihrig Jul 12, 2016
d224b47
test: improve error message in test-tick-processor
Trott Jul 12, 2016
f0d9610
doc: removed old git conflict markers from fs.md
jjhidalgar Jul 7, 2016
3b767b8
buffer: fix creating from zero-length ArrayBuffer
RReverser Jun 6, 2016
c10ade9
deps: back-port d721121 from v8 upstream
bnoordhuis Jul 9, 2016
a855b30
cluster: remove bind() and self
cjihrig Jul 13, 2016
46b9ef6
doc: fix typo in stream doc
Jul 14, 2016
c726ffb
doc: Warn against `uncaughtException` dependency.
lance Apr 25, 2016
9d9bd3c
timers: fix processing of nested timers
whitlockjc Jul 24, 2015
669af6e
doc: fix inconsistencies in code style
saadq Jul 15, 2016
17591c3
test: s/assert.fail/common.fail as appropriate
cjihrig Jul 14, 2016
3bd40ff
deps: no /safeseh for ml64.exe
indutny Jul 16, 2016
60c459c
util: inspect boxed symbols like other primitives
addaleax Jul 9, 2016
ba6ab7c
buffer: optimize hex_decode
chjj Jul 7, 2016
aa045cd
test: fix flaky test-http-server-consumed-timeout
Trott Jul 13, 2016
f7d3af6
doc: add `added:` information for stream
Jun 13, 2016
06bfb9e
src: fix handle leak in Buffer::New()
bnoordhuis Jul 13, 2016
978362d
src: fix handle leak in BuildStatsObject()
bnoordhuis Jul 13, 2016
e46efd9
src: fix handle leak in UDPWrap::Instantiate()
bnoordhuis Jul 13, 2016
61d88d9
src: remove unnecessary HandleScopes
bnoordhuis Jul 13, 2016
62a3ff2
doc: correct sample output of buf.compare
khalsah Jul 17, 2016
9d59b7d
test: avoid usage of mixed IPV6 addresses
gireeshpunathil Jul 13, 2016
059a721
doc: update CTC governance information
Trott Jul 13, 2016
f3182f6
deps: v8_inspector no longer depends on wtf
ofrobots Jul 15, 2016
bb187bb
deps: cherry-pick 1f53e42 from v8 upstream
bnoordhuis Jul 7, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
doc: fix inconsistencies in code style
Adds missing semicolons, removes extra white space, and properly indents
various code snippets in the documentation.

Reviewed-By: Evan Lucas <[email protected]>
Reviewed-By: targos - Michaël Zasso <[email protected]>
PR-URL: #7745
  • Loading branch information
saadq authored and evanlucas committed Jul 19, 2016
commit 669af6e6c8a1a58110ea123975ad26e19bde28c4
4 changes: 2 additions & 2 deletions doc/api/assert.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const obj3 = {
a : {
b : 1
}
}
};
const obj4 = Object.create(obj1);

assert.deepEqual(obj1, obj1);
Expand Down Expand Up @@ -230,7 +230,7 @@ const assert = require('assert');

assert.ifError(0); // OK
assert.ifError(1); // Throws 1
assert.ifError('error') // Throws 'error'
assert.ifError('error'); // Throws 'error'
assert.ifError(new Error()); // Throws Error
```

Expand Down
2 changes: 1 addition & 1 deletion doc/api/buffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ Buffers can be iterated over using the ECMAScript 2015 (ES6) `for..of` syntax:
const buf = Buffer.from([1, 2, 3]);

for (var b of buf)
console.log(b)
console.log(b);

// Prints:
// 1
Expand Down
2 changes: 1 addition & 1 deletion doc/api/crypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ var decrypted = '';
decipher.on('readable', () => {
var data = decipher.read();
if (data)
decrypted += data.toString('utf8');
decrypted += data.toString('utf8');
});
decipher.on('end', () => {
console.log(decrypted);
Expand Down
4 changes: 2 additions & 2 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -1022,12 +1022,12 @@ will be returned._
// OS X and Linux
fs.open('<directory>', 'a+', (err, fd) => {
// => [Error: EISDIR: illegal operation on a directory, open <directory>]
})
});

// Windows and FreeBSD
fs.open('<directory>', 'a+', (err, fd) => {
// => null, <fd>
})
});
```

## fs.openSync(path, flags[, mode])
Expand Down
6 changes: 3 additions & 3 deletions doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ http.get({
agent: false // create a new agent just for this one request
}, (res) => {
// Do stuff with response
})
});
```

### new Agent([options])
Expand Down Expand Up @@ -1451,8 +1451,8 @@ var req = http.request(options, (res) => {
console.log(`BODY: ${chunk}`);
});
res.on('end', () => {
console.log('No more data in response.')
})
console.log('No more data in response.');
});
});

req.on('error', (e) => {
Expand Down
4 changes: 2 additions & 2 deletions doc/api/https.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ options.agent = new https.Agent(options);

var req = https.request(options, (res) => {
...
}
});
```

Alternatively, opt out of connection pooling by not using an `Agent`.
Expand All @@ -251,7 +251,7 @@ var options = {

var req = https.request(options, (res) => {
...
}
});
```

[`Agent`]: #https_class_https_agent
Expand Down
2 changes: 1 addition & 1 deletion doc/api/path.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ path.format({
base : "file.txt",
ext : ".txt",
name : "file"
})
});
// returns 'C:\\path\\dir\\file.txt'
```

Expand Down
6 changes: 3 additions & 3 deletions doc/api/readline.md
Original file line number Diff line number Diff line change
Expand Up @@ -398,10 +398,10 @@ For instance: `[[substr1, substr2, ...], originalsubstring]`.

```js
function completer(line) {
var completions = '.help .error .exit .quit .q'.split(' ')
var hits = completions.filter((c) => { return c.indexOf(line) == 0 })
var completions = '.help .error .exit .quit .q'.split(' ');
var hits = completions.filter((c) => { return c.indexOf(line) == 0 });
// show all completions if none found
return [hits.length ? hits : completions, line]
return [hits.length ? hits : completions, line];
}
```

Expand Down
2 changes: 1 addition & 1 deletion doc/api/repl.md
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ net.createServer((socket) => {
output: socket
}).on('exit', () => {
socket.end();
})
});
}).listen('/tmp/node-repl-sock');

net.createServer((socket) => {
Expand Down
8 changes: 4 additions & 4 deletions doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -1227,9 +1227,9 @@ const Writable = require('stream').Writable;
const myWritable = new Writable({
write(chunk, encoding, callback) {
if (chunk.toString().indexOf('a') >= 0) {
callback(new Error('chunk is invalid'))
callback(new Error('chunk is invalid'));
} else {
callback()
callback();
}
}
});
Expand All @@ -1252,9 +1252,9 @@ class MyWritable extends Writable {

_write(chunk, encoding, callback) {
if (chunk.toString().indexOf('a') >= 0) {
callback(new Error('chunk is invalid'))
callback(new Error('chunk is invalid'));
} else {
callback()
callback();
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions doc/api/util.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,14 @@ const util = require('util');
const EventEmitter = require('events');

function MyStream() {
EventEmitter.call(this);
EventEmitter.call(this);
}

util.inherits(MyStream, EventEmitter);

MyStream.prototype.write = function(data) {
this.emit('data', data);
}
this.emit('data', data);
};

const stream = new MyStream();

Expand All @@ -161,7 +161,7 @@ console.log(MyStream.super_ === EventEmitter); // true

stream.on('data', (data) => {
console.log(`Received data: "${data}"`);
})
});
stream.write('It works!'); // Received data: "It works!"
```

Expand Down