Use Buffer.from instead of deprecated new Buffer
This commit is contained in:
parent
1c9421bc89
commit
9ddb62c42a
2 changed files with 2 additions and 2 deletions
|
@ -148,7 +148,7 @@ const unwrapArgs = function (sender, args) {
|
|||
case 'array':
|
||||
return unwrapArgs(sender, meta.value)
|
||||
case 'buffer':
|
||||
return new Buffer(meta.value)
|
||||
return Buffer.from(meta.value)
|
||||
case 'date':
|
||||
return new Date(meta.value)
|
||||
case 'promise':
|
||||
|
|
|
@ -163,7 +163,7 @@ const metaToValue = function (meta) {
|
|||
}
|
||||
return results
|
||||
case 'buffer':
|
||||
return new Buffer(meta.value)
|
||||
return Buffer.from(meta.value)
|
||||
case 'promise':
|
||||
return Promise.resolve({
|
||||
then: metaToValue(meta.then)
|
||||
|
|
Loading…
Reference in a new issue