lib/collection.js
function(options, ...rest) {
  Entity.apply(this, [options, ...rest]);
  this.itemType = options.itemType;
  this.itemFactory = options.itemFactory;
  this.body = defaults(options.body, {
    count: 0,
    items: []
  });
  if (options.items) {
    this.body.items = options.items.map(function(item) {
      return this.createItemEntity(item);
    });
    this.body.count = this.body.items.length;
  }
}
function(options, ...rest) {
  Entity.apply(this, [options, ...rest]);
  this.itemType = options.itemType;
  this.itemFactory = options.itemFactory;
  this.body = defaults(options.body, {
    count: 0,
    items: []
  });
  if (options.items) {
    this.body.items = options.items.map(function(item) {
      return this.createItemEntity(item);
    });
    this.body.count = this.body.items.length;
  }
}
function ( options , ... rest ) { Entity . apply ( this , [ options , ... rest ] ) ; this . itemType = options . itemType ; this . itemFactory = options . itemFactory ; this . body = defaults ( options . body , { count : 0 , items : [ ] } ) ; if ( options . items ) { this . body . items = options . items . map ( function ( item ) { return this . createItemEntity ( item ) ; } ) ; this . body . count = this . body . items . length ; } }
Object that represents a collection of entities returned by a resource's action
Object that represents a collection of entities returned by a resource s action