mirror of
https://github.com/tenrok/axios.git
synced 2026-06-17 19:21:29 +03:00
Changing to file level use strict statement
This commit is contained in:
+2
-7
@@ -1,3 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
var defaults = require('./defaults');
|
||||
var utils = require('./utils');
|
||||
var deprecatedMethod = require('./helpers/deprecatedMethod');
|
||||
@@ -6,8 +8,6 @@ var InterceptorManager = require('./core/InterceptorManager');
|
||||
|
||||
// Polyfill ES6 Promise if needed
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
// webpack is being used to set es6-promise to the native Promise
|
||||
// for the standalone build. It's necessary to make sure polyfill exists.
|
||||
var P = require('es6-promise');
|
||||
@@ -17,8 +17,6 @@ var InterceptorManager = require('./core/InterceptorManager');
|
||||
})();
|
||||
|
||||
var axios = module.exports = function axios(config) {
|
||||
'use strict';
|
||||
|
||||
config = utils.merge({
|
||||
method: 'get',
|
||||
headers: {},
|
||||
@@ -73,7 +71,6 @@ axios.defaults = defaults;
|
||||
|
||||
// Expose all/spread
|
||||
axios.all = function (promises) {
|
||||
'use strict';
|
||||
return Promise.all(promises);
|
||||
};
|
||||
axios.spread = require('./helpers/spread');
|
||||
@@ -86,8 +83,6 @@ axios.interceptors = {
|
||||
|
||||
// Provide aliases for supported request methods
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
function createShortMethods() {
|
||||
utils.forEach(arguments, function (method) {
|
||||
axios[method] = function (url, config) {
|
||||
|
||||
Reference in New Issue
Block a user