src/angular-model.js
function autoBox(object, model, data) {
    if (!object) {
      return isArray(data) ? model.collection(data, true) : model.instance(data);
    }
    if (isArray(data) && isArray(object)) {
      return model.collection(data, true);
    }
    if (data && JSON.stringify(data).length > 3) {
      deepExtend(object, data);
      object.$original.sync(data);
    }
    return object;
  }
function autoBox(object, model, data) {
    if (!object) {
      return isArray(data) ? model.collection(data, true) : model.instance(data);
    }
    if (isArray(data) && isArray(object)) {
      return model.collection(data, true);
    }
    if (data && JSON.stringify(data).length > 3) {
      deepExtend(object, data);
      object.$original.sync(data);
    }
    return object;
  }
function autoBox ( object , model , data ) { if ( ! object ) { return isArray ( data ) ? model . collection ( data , true ) : model . instance ( data ) ; } if ( isArray ( data ) && isArray ( object ) ) { return model . collection ( data , true ) ; } if ( data && JSON . stringify ( data ) . length > 3 ) { deepExtend ( object , data ) ; object . $original . sync ( data ) ; } return object ; }
'Box' an object value in a model instance if it is present. Otherwise, return an empty model object.
Box an object value in a model instance if it is present . Otherwise return an empty model object .