Use 'new' when creating Buffer

This commit is contained in:
Andrew Sliwinski 2016-11-03 17:37:34 -04:00
parent edafabb482
commit 0bcfeca2a0

View file

@ -14,7 +14,7 @@ module.exports = {
if (typeof s !== 'string') return;
// Convert from binary to Base64
var b64String = Buffer(s, 'binary').toString('base64');
var b64String = new Buffer(s, 'binary').toString('base64');
// Replace special characters with URL-safe alternates
return b64String.replace(