Skip to content

Commit

Permalink
Replace Buffer.new() with Buffer.from()
Browse files Browse the repository at this point in the history
  • Loading branch information
scottgonzalez committed Jan 7, 2019
1 parent c291754 commit 2ee1345
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var BaseClient = function(settings) {
extend(this, settings);

this.authHeader = "Basic " +
new Buffer(this.username + ":" + this.password).toString("base64");
Buffer.from(this.username + ":" + this.password).toString("base64");
};

BaseClient.prototype.request = function(options, data, fn) {
Expand Down
4 changes: 2 additions & 2 deletions test/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ var pollWorkerRetryInterval = 2000;

var encoding = process.env.TRAVIS ? "base64" : "utf8";
module.exports.browserStack = {
username: new Buffer(process.env.BROWSERSTACK_USERNAME || "", encoding).toString(),
password: new Buffer(process.env.BROWSERSTACK_KEY || "", encoding).toString()
username: Buffer.from(process.env.BROWSERSTACK_USERNAME || "", encoding).toString(),
password: Buffer.from(process.env.BROWSERSTACK_KEY || "", encoding).toString()
};

module.exports.terminateWorkers = function terminateWorkers(client, workers, callback) {
Expand Down

0 comments on commit 2ee1345

Please sign in to comment.