mirror of
https://github.com/tenrok/axios.git
synced 2026-06-08 17:22:34 +03:00
Changing to file level use strict statement
This commit is contained in:
+3
-14
@@ -1,4 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
/*global toString:true*/
|
||||
|
||||
// utils is a library of generic helper functions non-specific to axios
|
||||
|
||||
var toString = Object.prototype.toString;
|
||||
@@ -10,7 +13,6 @@ var toString = Object.prototype.toString;
|
||||
* @returns {boolean} True if value is an Array, otherwise false
|
||||
*/
|
||||
function isArray(val) {
|
||||
'use strict';
|
||||
return toString.call(val) === '[object Array]';
|
||||
}
|
||||
|
||||
@@ -21,7 +23,6 @@ function isArray(val) {
|
||||
* @returns {boolean} True if value is an ArrayBuffer, otherwise false
|
||||
*/
|
||||
function isArrayBuffer(val) {
|
||||
'use strict';
|
||||
return toString.call(val) === '[object ArrayBuffer]';
|
||||
}
|
||||
|
||||
@@ -32,7 +33,6 @@ function isArrayBuffer(val) {
|
||||
* @returns {boolean} True if value is an FormData, otherwise false
|
||||
*/
|
||||
function isFormData(val) {
|
||||
'use strict';
|
||||
return toString.call(val) === '[object FormData]';
|
||||
}
|
||||
|
||||
@@ -43,7 +43,6 @@ function isFormData(val) {
|
||||
* @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
|
||||
*/
|
||||
function isArrayBufferView(val) {
|
||||
'use strict';
|
||||
if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
|
||||
return ArrayBuffer.isView(val);
|
||||
} else {
|
||||
@@ -58,7 +57,6 @@ function isArrayBufferView(val) {
|
||||
* @returns {boolean} True if value is a String, otherwise false
|
||||
*/
|
||||
function isString(val) {
|
||||
'use strict';
|
||||
return typeof val === 'string';
|
||||
}
|
||||
|
||||
@@ -69,7 +67,6 @@ function isString(val) {
|
||||
* @returns {boolean} True if value is a Number, otherwise false
|
||||
*/
|
||||
function isNumber(val) {
|
||||
'use strict';
|
||||
return typeof val === 'number';
|
||||
}
|
||||
|
||||
@@ -80,7 +77,6 @@ function isNumber(val) {
|
||||
* @returns {boolean} True if the value is undefined, otherwise false
|
||||
*/
|
||||
function isUndefined(val) {
|
||||
'use strict';
|
||||
return typeof val === 'undefined';
|
||||
}
|
||||
|
||||
@@ -91,7 +87,6 @@ function isUndefined(val) {
|
||||
* @returns {boolean} True if value is an Object, otherwise false
|
||||
*/
|
||||
function isObject(val) {
|
||||
'use strict';
|
||||
return val !== null && typeof val === 'object';
|
||||
}
|
||||
|
||||
@@ -102,7 +97,6 @@ function isObject(val) {
|
||||
* @returns {boolean} True if value is a Date, otherwise false
|
||||
*/
|
||||
function isDate(val) {
|
||||
'use strict';
|
||||
return toString.call(val) === '[object Date]';
|
||||
}
|
||||
|
||||
@@ -113,7 +107,6 @@ function isDate(val) {
|
||||
* @returns {boolean} True if value is a File, otherwise false
|
||||
*/
|
||||
function isFile(val) {
|
||||
'use strict';
|
||||
return toString.call(val) === '[object File]';
|
||||
}
|
||||
|
||||
@@ -124,7 +117,6 @@ function isFile(val) {
|
||||
* @returns {boolean} True if value is a Blob, otherwise false
|
||||
*/
|
||||
function isBlob(val) {
|
||||
'use strict';
|
||||
return toString.call(val) === '[object Blob]';
|
||||
}
|
||||
|
||||
@@ -135,7 +127,6 @@ function isBlob(val) {
|
||||
* @returns {String} The String freed of excess whitespace
|
||||
*/
|
||||
function trim(str) {
|
||||
'use strict';
|
||||
return str.replace(/^\s*/, '').replace(/\s*$/, '');
|
||||
}
|
||||
|
||||
@@ -152,7 +143,6 @@ function trim(str) {
|
||||
* @param {Function} fn The callback to invoke for each item
|
||||
*/
|
||||
function forEach(obj, fn) {
|
||||
'use strict';
|
||||
// Don't bother if no value provided
|
||||
if (obj === null || typeof obj === 'undefined') {
|
||||
return;
|
||||
@@ -200,7 +190,6 @@ function forEach(obj, fn) {
|
||||
* @returns {Object} Result of all merge properties
|
||||
*/
|
||||
function merge(/*obj1, obj2, obj3, ...*/) {
|
||||
'use strict';
|
||||
var result = {};
|
||||
forEach(arguments, function (obj) {
|
||||
forEach(obj, function (val, key) {
|
||||
|
||||
Reference in New Issue
Block a user