aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2018-04-01 22:03:59 -0700
committerRich Trott <rtrott@gmail.com>2018-04-04 05:41:30 -0700
commit3d61e14704bb82ffc1442e6f6c3756f4432b03b4 (patch)
treee832a873dc3415088801bab4d4adcf57ff208061 /lib
parentde0053cc3280bdf72c9010f383290f79120a1e98 (diff)
downloadandroid-node-v8-3d61e14704bb82ffc1442e6f6c3756f4432b03b4.tar.gz
android-node-v8-3d61e14704bb82ffc1442e6f6c3756f4432b03b4.tar.bz2
android-node-v8-3d61e14704bb82ffc1442e6f6c3756f4432b03b4.zip
buffer: shorten deprecation warning
Shorten the deprecation warning for Buffer constructor. PR-URL: https://github.com/nodejs/node/pull/19741 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/buffer.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/buffer.js b/lib/buffer.js
index 42862c02da..73e3bc4420 100644
--- a/lib/buffer.js
+++ b/lib/buffer.js
@@ -140,11 +140,9 @@ function alignPool() {
}
var bufferWarn = true;
-const bufferWarning = 'The Buffer() and new Buffer() constructors are not ' +
- 'recommended for use due to security and usability ' +
- 'concerns. Please use the Buffer.alloc(), ' +
- 'Buffer.allocUnsafe(), or Buffer.from() construction ' +
- 'methods instead.';
+const bufferWarning = 'Buffer() is deprecated due to security and usability ' +
+ 'issues. Please use the Buffer.alloc(), ' +
+ 'Buffer.allocUnsafe(), or Buffer.from() methods instead.';
function showFlaggedDeprecation() {
if (bufferWarn) {