How to use the openneuro-client.datasets.getDatasets function in openneuro-client

To help you get started, we’ve selected a few openneuro-client 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 OpenNeuroOrg / openneuro / packages / openneuro-app / src / scripts / utils / datalad.js View on Github external
async getDatasets(options) {
      const query = datasets.getDatasets
      return new Promise((resolve, reject) => {
        client.query({
          query: query
        })
        .then(data => {
            data = clone(data)
            let datasets = data.data.datasets
            if (options.isPublic) {
              datasets = data.data.datasets.filter((dataset) => {
                return dataset.public
              })
            }
            data.data.datasets = datasets
            resolve(data)
        })
        .catch(err => {