Note: Most of these examples were taken from http://node.green
function test(a, b = '1') { console.log(a, b)} test(1, 2) // '1 2' test(2) // '2 1'
function test(a, ...args) { console.log(a, args)} test(1, 2, 3, 4, 5) // '1 [ 2, 3, 4, 5 ]'
const { c, x:d } = { c: 6, d: 8 } console.log(c) // 6 console.log(d) // 8
new Buffer()
in favor of Buffer.from()
, Buffer.alloc()
and Buffer.allocUnsafe()
Worker#suicide
has been deprecated in favor of the more descriptive Worker#exitedAfterDisconnect
querystring.parse()
no longer inherits from Object.prototype
url.resolve()
now drops auth info if host changesFull list: https://github.com/nodejs/node/wiki/Breaking-changes-between-v5-and-v6
LTS Status | Release | LTS Start | Maintenance Start | LTS End |
---|---|---|---|---|
Maintenance | v0.10 | - | 2015-10-01 | 2016-10-01 |
Maintenance | v0.12 | - | 2016-04-01 | 2016-12-31 |
Active | v4 | 2015-10-01 | 2017-04-01 | 2018-04-01 |
N/A | v5 | N/A | ||
Pending | v6 | 2016-10-01 | 2018-04-01 | 2019-04-01 |
process.exit()
truncation #6456
process.exit()
can prevent stdout/stderr from
being flushed.Help.com is hiring!