• File: Cancel.js
  • Full Path: /home6/laduliya/mobile.digitalilab.com/axios/lib/cancel/Cancel.js
  • Date Modified: 10/26/1985 8:15 AM
  • File size: 385 bytes
  • MIME-type: text/plain
  • Charset: utf-8
'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;