Replaces 'new Buffer' with 'Buffer.from'
This commit is contained in:
parent
8275a462dc
commit
c08ef63867
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "tor-router",
|
"name": "tor-router",
|
||||||
"version": "3.2.1",
|
"version": "3.2.2",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"repository": "git@github.com:znetstar/tor-router.git",
|
"repository": "git@github.com:znetstar/tor-router.git",
|
||||||
"author": "Zachary Boyd <zachary@zacharyboyd.nyc>",
|
"author": "Zachary Boyd <zachary@zacharyboyd.nyc>",
|
||||||
|
|
|
@ -76,7 +76,7 @@ class TorProcess extends EventEmitter {
|
||||||
});
|
});
|
||||||
|
|
||||||
tor.stderr.on('data', (data) => {
|
tor.stderr.on('data', (data) => {
|
||||||
let error_message = new Buffer(data).toString('utf8');
|
let error_message = Buffer.from(data).toString('utf8');
|
||||||
|
|
||||||
this.emit('error', new Error(error_message));
|
this.emit('error', new Error(error_message));
|
||||||
});
|
});
|
||||||
|
@ -87,7 +87,7 @@ class TorProcess extends EventEmitter {
|
||||||
});
|
});
|
||||||
|
|
||||||
tor.stdout.on('data', (data) => {
|
tor.stdout.on('data', (data) => {
|
||||||
let text = new Buffer(data).toString('utf8');
|
let text = Buffer.from(data).toString('utf8');
|
||||||
let msg = text.split('] ').pop();
|
let msg = text.split('] ').pop();
|
||||||
if (text.indexOf('Bootstrapped 100%: Done') !== -1){
|
if (text.indexOf('Bootstrapped 100%: Done') !== -1){
|
||||||
this.emit('ready');
|
this.emit('ready');
|
||||||
|
|
Loading…
Reference in a new issue