How to use the netlify-cms-lib-util.filterByPropExtension function in netlify-cms-lib-util

To help you get started, we’ve selected a few netlify-cms-lib-util examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github netlify / netlify-cms / packages / netlify-cms-backend-bitbucket / src / implementation.js View on Github external
entriesByFolder(collection, extension) {
    const listPromise = this.api.listFiles(
      collection.get('folder'),
      getCollectionDepth(collection),
    );
    return resolvePromiseProperties({
      files: listPromise
        .then(({ entries }) => entries)
        .then(filterByPropExtension(extension, 'path'))
        .then(this.fetchFiles),
      cursor: listPromise.then(({ cursor }) => cursor),
    }).then(({ files, cursor }) => {
      files[CURSOR_COMPATIBILITY_SYMBOL] = cursor;
      return files;
    });
  }
github netlify / netlify-cms / packages / netlify-cms-backend-bitbucket / src / implementation.js View on Github external
allEntriesByFolder(collection, extension) {
    return this.api
      .listAllFiles(collection.get('folder'), getCollectionDepth(collection))
      .then(filterByPropExtension(extension, 'path'))
      .then(this.fetchFiles);
  }