lib/collection.js
function Collection(options) {
  if (!(this instanceof Collection)){
    return new Collection(options);
  }

  options = options || {};

  if (options instanceof Array) {
    this.modelType = undefined;
    this.items = options;
  } else {
    this.modelType = options.modelType;
    this.items = options.items || [];

    if (!(this.items instanceof Array)) {
      throw new CollectionException('Items must be an array');
    }
  }
}
function Collection(options) {
  if (!(this instanceof Collection)){
    return new Collection(options);
  }

  options = options || {};

  if (options instanceof Array) {
    this.modelType = undefined;
    this.items = options;
  } else {
    this.modelType = options.modelType;
    this.items = options.items || [];

    if (!(this.items instanceof Array)) {
      throw new CollectionException('Items must be an array');
    }
  }
}
Create a new collection

@param {Object} options       the options