examples/npm/output.js
function(options) {
      options || (options = {});
      if (this.isNew()) return this.trigger('destroy', this, this.collection, options);
      var model = this;
      var success = options.success;
      options.success = function(resp) {
        model.trigger('destroy', model, model.collection, options);
        if (success) success(model, resp);
      };
      options.error = wrapError(options.error, model, options);
      return (this.sync || Backbone.sync).call(this, 'delete', this, options);
    }
function(options) {
      options || (options = {});
      if (this.isNew()) return this.trigger('destroy', this, this.collection, options);
      var model = this;
      var success = options.success;
      options.success = function(resp) {
        model.trigger('destroy', model, model.collection, options);
        if (success) success(model, resp);
      };
      options.error = wrapError(options.error, model, options);
      return (this.sync || Backbone.sync).call(this, 'delete', this, options);
    }
function ( options ) { options || ( options = { } ) ; if ( this . isNew ( ) ) return this . trigger ( 'destroy' , this , this . collection , options ) ; var model = this ; var success = options . success ; options . success = function ( resp ) { model . trigger ( 'destroy' , model , model . collection , options ) ; if ( success ) success ( model , resp ) ; } ; options . error = wrapError ( options . error , model , options ) ; return ( this . sync || Backbone . sync ) . call ( this , 'delete' , this , options ) ; }
Destroy this model on the server if it was already persisted. Upon success, the model is removed from its collection, if it has one.
Destroy this model on the server if it was already persisted . Upon success the model is removed from its collection if it has one .