code: function (promise) {
              promise.success = promise.done;
              promise.error = promise.fail;
              promise.complete = promise.always;
              return promise;
          }
docs: Maps jqXHR callbacks to the equivalent methods of the given Promise object: