Commit f71200b
authored
Use
Node has [deprecated](https://nodejs.org/api/buffer.html#buffer_class_buffer) the use of `new Buffer()` as of v6.0.0 and has assigned it a stability score of 0. The Javascript tutorial should utilize [`Buffer.from`](https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_str_encoding) instead, which was introduced in v5.10.0.
Specifically, the [message sending example](https://www.rabbitmq.com/tutorials/tutorial-one-javascript.html) with this line:
`ch.sendToQueue(q, new Buffer('Hello World!'));`
should be updated to:
`ch.sendToQueue(q, Buffer.from('Hello World!'));`Buffer.from in place of new Buffer
1 parent 31fe04e commit f71200b
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
0 commit comments