Skip to content

Commit

Permalink
Use Buffer.from instead of new Buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
KidkArolis committed Oct 3, 2018
1 parent 241424c commit d3e7751
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions __tests__/registries/npm-registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {BufferReporter} from '../../src/reporters/index.js';
import homeDir, {home} from '../../src/util/user-home-dir.js';

function basicAuth(username, password): string {
const pw = new Buffer(String(password), 'base64').toString();
return new Buffer(String(username) + ':' + pw).toString('base64');
const pw = Buffer.from(String(password), 'base64').toString();
return Buffer.from(String(username) + ':' + pw).toString('base64');
}

describe('normalizeConfig', () => {
Expand Down

0 comments on commit d3e7751

Please sign in to comment.