lib/model.js
function() {
    var data   = {};

    if (this.data && !isObject(this.data)) {
      return this.data;
    }

    // TODO - don't do this yet until virt properties are checked
    // var keys   = Object.keys(this);
    var keys = Object.keys(this.data ? this.data : this);

    for (var i = 0, n = keys.length; i < n; i++) {
      var key = keys[i];

      if (key in this.constructor.prototype || key.charCodeAt(0) === 95) {
        continue;
      }

      data[key] = this[key];
    }

    return data;
  }
function() {
    var data   = {};

    if (this.data && !isObject(this.data)) {
      return this.data;
    }

    // TODO - don't do this yet until virt properties are checked
    // var keys   = Object.keys(this);
    var keys = Object.keys(this.data ? this.data : this);

    for (var i = 0, n = keys.length; i < n; i++) {
      var key = keys[i];

      if (key in this.constructor.prototype || key.charCodeAt(0) === 95) {
        continue;
      }

      data[key] = this[key];
    }

    return data;
  }
function ( ) { var data = { } ; if ( this . data && ! isObject ( this . data ) ) { return this . data ; } // TODO - don't do this yet until virt properties are checked // var keys   = Object.keys(this); var keys = Object . keys ( this . data ? this . data : this ) ; for ( var i = 0 , n = keys . length ; i < n ; i ++ ) { var key = keys [ i ] ; if ( key in this . constructor . prototype || key . charCodeAt ( 0 ) === 95 ) { continue ; } data [ key ] = this [ key ] ; } return data ; }
serialize this model back into a data object
serialize this model back into a data object