items (params = {}) {
    return new Promise(
      (resolve, reject) => {
        if (this._isCached('items')) {
          return resolve(this._cached('items'))
        }

        this.logger.info(`Loading items for collection: ${this.path}`)

        this.github.files(this._params(params, { path: this.path })).then(({ files }) => {
          let items = []

          if (Array.isArray(files)) {
            items = files.filter(item => {
              return (item.name.substr(0, 1) !== '_')
            }).map(item => {
              return new CollectionItem(Object.assign({}, item, {
                collection: this
              }))
            })
          } else {
            this.logger.warn(`Invalid collection items: ${this.path}`)
          }

          resolve(this._cache('items', items))
        }).catch(reject)
      }
    )
  }
/**
   * Load items for this collection
   *
   * @param {Object} [params] - Additional params (sent to github)
   * @returns {Promise<Array>} - Returns promise with array of CollectionItem objects
   */
Load items for this collection
@param {Object} [params] - Additional params (sent to github)
@returns {Promise} - Returns promise with array of CollectionItem objects
Load items for this collection @param { Object } [ params ] - Additional params ( sent to github ) @returns { Promise } - Returns promise with array of CollectionItem objects
items (params = {}) {
    return new Promise(
      (resolve, reject) => {
        if (this._isCached('items')) {
          return resolve(this._cached('items'))
        }
        this.logger.info(`Loading items for collection: ${this.path}`)
        this.github.files(this._params(params, { path: this.path })).then(({ files }) => {
          let items = []
          if (Array.isArray(files)) {
            items = files.filter(item => {
              return (item.name.substr(0, 1) !== '_')
            }).map(item => {
              return new CollectionItem(Object.assign({}, item, {
                collection: this
              }))
            })
          } else {
            this.logger.warn(`Invalid collection items: ${this.path}`)
          }
          resolve(this._cache('items', items))
        }).catch(reject)
      }
    )
  }
items ( params = { } ) { return new Promise ( ( resolve , reject ) => { if ( this . _isCached ( 'items' ) ) { return resolve ( this . _cached ( 'items' ) ) } this . logger . info ( ` ${ this . path } ` ) this . github . files ( this . _params ( params , { path : this . path } ) ) . then ( ( { files } ) => { let items = [ ] if ( Array . isArray ( files ) ) { items = files . filter ( item => { return ( item . name . substr ( 0 , 1 ) !== '_' ) } ) . map ( item => { return new CollectionItem ( Object . assign ( { } , item , { collection : this } ) ) } ) } else { this . logger . warn ( ` ${ this . path } ` ) } resolve ( this . _cache ( 'items' , items ) ) } ) . catch ( reject ) } ) }
Load items for this collection
 @param {Object} [params] - Additional params (sent to github)
 @returns {Promise<Array>} - Returns promise with array of CollectionItem objects
Load items for this collection @param { Object } [ params ] - Additional params ( sent to github ) @returns { Promise<Array > } - Returns promise with array of CollectionItem objects