aboutsummaryrefslogtreecommitdiff
path: root/node_modules/axios/lib/cancel/Cancel.js
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-08-27 04:19:34 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-08-27 04:19:34 +0200
commit665e88c72b568bf25ff0ec8a14109e2504f99aa8 (patch)
treec380e91e40efa8a47dea9ff833415f17e273d106 /node_modules/axios/lib/cancel/Cancel.js
parent24181bdf20e0d23ec5ec5d2eaa08ae1cfb905f0f (diff)
node_modules
Diffstat (limited to 'node_modules/axios/lib/cancel/Cancel.js')
-rw-r--r--node_modules/axios/lib/cancel/Cancel.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/node_modules/axios/lib/cancel/Cancel.js b/node_modules/axios/lib/cancel/Cancel.js
new file mode 100644
index 000000000..e0de4003f
--- /dev/null
+++ b/node_modules/axios/lib/cancel/Cancel.js
@@ -0,0 +1,19 @@
+'use strict';
+
+/**
+ * A `Cancel` is an object that is thrown when an operation is canceled.
+ *
+ * @class
+ * @param {string=} message The message.
+ */
+function Cancel(message) {
+ this.message = message;
+}
+
+Cancel.prototype.toString = function toString() {
+ return 'Cancel' + (this.message ? ': ' + this.message : '');
+};
+
+Cancel.prototype.__CANCEL__ = true;
+
+module.exports = Cancel;