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':
|
case 'array':
|
||||||
return unwrapArgs(sender, meta.value)
|
return unwrapArgs(sender, meta.value)
|
||||||
case 'buffer':
|
case 'buffer':
|
||||||
return new Buffer(meta.value)
|
return Buffer.from(meta.value)
|
||||||
case 'date':
|
case 'date':
|
||||||
return new Date(meta.value)
|
return new Date(meta.value)
|
||||||
case 'promise':
|
case 'promise':
|
||||||
|
|
|
@ -163,7 +163,7 @@ const metaToValue = function (meta) {
|
||||||
}
|
}
|
||||||
return results
|
return results
|
||||||
case 'buffer':
|
case 'buffer':
|
||||||
return new Buffer(meta.value)
|
return Buffer.from(meta.value)
|
||||||
case 'promise':
|
case 'promise':
|
||||||
return Promise.resolve({
|
return Promise.resolve({
|
||||||
then: metaToValue(meta.then)
|
then: metaToValue(meta.then)
|
||||||
|
|
Loading…
Reference in a new issue