summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/request/lib/helpers.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/request/lib/helpers.js')
-rw-r--r--deps/npm/node_modules/request/lib/helpers.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/deps/npm/node_modules/request/lib/helpers.js b/deps/npm/node_modules/request/lib/helpers.js
index f9d727e382..05c77a0bdd 100644
--- a/deps/npm/node_modules/request/lib/helpers.js
+++ b/deps/npm/node_modules/request/lib/helpers.js
@@ -2,6 +2,7 @@
var jsonSafeStringify = require('json-stringify-safe')
, crypto = require('crypto')
+ , Buffer = require('safe-buffer').Buffer
var defer = typeof setImmediate === 'undefined'
? process.nextTick
@@ -35,7 +36,7 @@ function isReadStream (rs) {
}
function toBase64 (str) {
- return (new Buffer(str || '', 'utf8')).toString('base64')
+ return Buffer.from(str || '', 'utf8').toString('base64')
}
function copy (obj) {