mirror of
https://github.com/tenrok/axios.git
synced 2026-06-08 17:22:34 +03:00
Remove dependency on is-buffer (#1816)
* Remove dependency on is-buffer from package.json
This commit is contained in:
committed by
Yasu Flores
parent
0cc22c2f42
commit
1a32ca0601
+11
-1
@@ -1,7 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
var bind = require('./helpers/bind');
|
||||
var isBuffer = require('is-buffer');
|
||||
|
||||
/*global toString:true*/
|
||||
|
||||
@@ -19,6 +18,17 @@ function isArray(val) {
|
||||
return toString.call(val) === '[object Array]';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Determine if a value is a Buffer
|
||||
*
|
||||
* @param {Object} val The value to test
|
||||
* @returns {boolean} True if value is a Buffer, otherwise false
|
||||
*/
|
||||
function isBuffer(val) {
|
||||
return ![undefined, null].includes(val) && val.constructor === Buffer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if a value is an ArrayBuffer
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user