Skip to content

Commit e49237c

Browse files
committed
Removing es6-promise dependency
1 parent ffc0237 commit e49237c

File tree

3 files changed

+2
-13
lines changed

3 files changed

+2
-13
lines changed

lib/axios.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,6 @@ var utils = require('./utils');
55
var dispatchRequest = require('./core/dispatchRequest');
66
var InterceptorManager = require('./core/InterceptorManager');
77

8-
// Polyfill ES6 Promise if needed
9-
(function () {
10-
// webpack is being used to set es6-promise to the native Promise
11-
// for the standalone build. It's necessary to make sure polyfill exists.
12-
var P = require('es6-promise');
13-
if (P && typeof P.polyfill === 'function') {
14-
P.polyfill();
15-
}
16-
})();
17-
188
var axios = module.exports = function axios(config) {
199
config = utils.merge({
2010
method: 'get',

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,9 @@
2626
"url": "https://github.com/mzabriskie/axios/issues"
2727
},
2828
"homepage": "https://github.com/mzabriskie/axios",
29-
"dependencies": {
30-
"es6-promise": "^2.3.0"
31-
},
3229
"devDependencies": {
3330
"coveralls": "^2.11.2",
31+
"es6-promise": "^2.3.0",
3432
"grunt": "^0.4.5",
3533
"grunt-banner": "^0.4.0",
3634
"grunt-contrib-clean": "^0.6.0",

test/specs/promise.spec.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
require('es6-promise').polyfill();
12
var axios = require('../../index');
23

34
describe('promise', function () {

0 commit comments

Comments
 (0)