Skip to content

Commit ba66b59

Browse files
committed
add promise helpers
1 parent 7fc0e26 commit ba66b59

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ export default (function create(defaults) {
6464
axios.put = createMethod('put', true);
6565
axios.patch = createMethod('patch', true);
6666

67+
// hmmm.
68+
axios.all = Promise.all;
69+
axios.spread = function(fn) {
70+
return function (results) {
71+
return fn.apply(this, results);
72+
};
73+
};
74+
6775
function deepMerge(opts, overrides, lowerCase) {
6876
if (Array.isArray(opts)) {
6977
return opts.concat(overrides);

0 commit comments

Comments
 (0)