2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-17 19:21:29 +03:00

Adding axios.isCancel method

This commit is contained in:
Nick Uraltsev
2016-09-21 18:47:37 -07:00
parent 920769d0d7
commit 216e2a6787
9 changed files with 31 additions and 4 deletions
+2
View File
@@ -14,4 +14,6 @@ Cancel.prototype.toString = function toString() {
return 'Cancel' + (this.message ? ': ' + this.message : '');
};
Cancel.prototype.__CANCEL__ = true;
module.exports = Cancel;
+5
View File
@@ -0,0 +1,5 @@
'use strict';
module.exports = function isCancel(value) {
return !!(value && value.__CANCEL__);
};