lib: runtime deprecate SlowBuffer

PR-URL: https://github.com/nodejs/node/pull/55175
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
This commit is contained in:
Rafael Gonzaga 2024-10-15 18:24:39 -03:00 committed by GitHub
parent 2545b9e02c
commit 019efe1453
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 16 additions and 3 deletions

View file

@ -88,6 +88,7 @@ const {
kIsEncodingSymbol,
defineLazyProperties,
encodingsMap,
deprecate,
} = require('internal/util');
const {
isAnyArrayBuffer,
@ -1322,7 +1323,10 @@ function isAscii(input) {
module.exports = {
Buffer,
SlowBuffer,
SlowBuffer: deprecate(
SlowBuffer,
'SlowBuffer() is deprecated. Please use Buffer.allocUnsafeSlow()',
'DEP0030'),
transcode,
isUtf8,
isAscii,