packages/rebound-data/lib/model.js
function(attributes, options={}){
    var self = this;
    if(attributes === null || attributes === undefined){ attributes = {}; }
    attributes.isModel && (attributes = attributes.attributes);
    this.helpers = {};
    this.defaults = this.defaults || {};
    this.setParent( options.parent || this );
    this.setRoot( options.root || this );
    this.__path = options.path || this.__path;

    // Convert getters and setters to computed properties
    $.extractComputedProps(attributes);

    Backbone.Model.call( this, attributes, options );

  }
function(attributes, options={}){
    var self = this;
    if(attributes === null || attributes === undefined){ attributes = {}; }
    attributes.isModel && (attributes = attributes.attributes);
    this.helpers = {};
    this.defaults = this.defaults || {};
    this.setParent( options.parent || this );
    this.setRoot( options.root || this );
    this.__path = options.path || this.__path;

    // Convert getters and setters to computed properties
    $.extractComputedProps(attributes);

    Backbone.Model.call( this, attributes, options );

  }
function ( attributes , options = { } ) { var self = this ; if ( attributes === null || attributes === undefined ) { attributes = { } ; } attributes . isModel && ( attributes = attributes . attributes ) ; this . helpers = { } ; this . defaults = this . defaults || { } ; this . setParent ( options . parent || this ) ; this . setRoot ( options . root || this ) ; this . __path = options . path || this . __path ; // Convert getters and setters to computed properties $ . extractComputedProps ( attributes ) ; Backbone . Model . call ( this , attributes , options ) ; }
Create a new Model with the specified attributes. The Model's lineage is set up here to keep track of it's place in the data tree.
Create a new Model with the specified attributes . The Model s lineage is set up here to keep track of it s place in the data tree .