model.js
function(resp, options) {
    // Mongodb sometimes returns an array of one document
    if (_.isArray(resp)) {
      resp = resp[0];
    }
    resp = _.defaultsDeep({}, resp, this.defaults());
    return resp;
  }
function(resp, options) {
    // Mongodb sometimes returns an array of one document
    if (_.isArray(resp)) {
      resp = resp[0];
    }
    resp = _.defaultsDeep({}, resp, this.defaults());
    return resp;
  }
function ( resp , options ) { // Mongodb sometimes returns an array of one document if ( _ . isArray ( resp ) ) { resp = resp [ 0 ] ; } resp = _ . defaultsDeep ( { } , resp , this . defaults ( ) ) ; return resp ; }
Backbone `parse` extended with support for defaults

@param {Object|Array} resp
@param {Object} options
@return {Object}
Backbone parse extended with support for defaults