Use Buffer.from instead of deprecated new Buffer

This commit is contained in:
Cheng Zhao 2016-07-25 16:40:22 +09:00
parent 1c9421bc89
commit 9ddb62c42a
2 changed files with 2 additions and 2 deletions

View file

@ -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':

View file

@ -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)