How to use the urlite/querystring.stringify function in urlite

To help you get started, we’ve selected a few urlite 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 / dashboard / dashboard.jobs.jsx View on Github external
return paginatedResults.map(job => {
      let user =
        job.hasOwnProperty('userMetadata') &&
        job.userMetadata.hasOwnProperty('email')
          ? job.userMetadata.email
          : job.userId
      let dateAdded = moment(job.analysis.created).format('L')
      let timeago = moment(job.analysis.created).fromNow(true)
      const datasetId = bids.decodeId(job.datasetId)
      const snapshotId = bids.decodeId(job.snapshotId)
      const jobQuery = {
        app: job.appLabel,
        version: job.appVersion,
        job: job._id,
      }
      const queryString = querystring(jobQuery)
      const jobUrl =
        '/datasets/' + datasetId + '/versions/' + snapshotId + queryString
      return (
        <div>
          <div>
            <div>
              <div>
                
                  <h4>
                    {job.appLabel} - v{job.appVersion}
                  </h4>
                
                <div>
                  <div>
                    Status: {job.analysis.status}
                  </div></div></div></div></div></div>
github OpenNeuroOrg / openneuro / packages / openneuro-app / src / scripts / dataset / dataset.store.js View on Github external
dismissJobsModal(success, snapshotId, appLabel, appVersion, jobId, history) {
    this.toggleModal('jobs')
    if (success) {
      if (snapshotId !== this.data.dataset._id) {
        let datasetId = this.data.dataset.original
          ? this.data.dataset.original
          : this.data.dataset._id
        const base = '/datasets/' + datasetId + '/versions/' + snapshotId
        const query = { app: appLabel, version: appVersion, job: jobId }
        const url = base + querystring(query)
        history.push(url)
      }
    }
  },
github OpenNeuroOrg / openneuro / app / src / scripts / dataset / dataset.store.js View on Github external
dismissJobsModal(success, snapshotId, appLabel, appVersion, jobId, history) {
    this.toggleModal('jobs')
    if (success) {
      if (snapshotId !== this.data.dataset._id) {
        let datasetId = this.data.dataset.original
          ? this.data.dataset.original
          : this.data.dataset._id
        const base = '/datasets/' + datasetId + '/versions/' + snapshotId
        const query = { app: appLabel, version: appVersion, job: jobId }
        const url = base + querystring(query)
        history.push(url)
      }
    }
  },
github OpenNeuroOrg / openneuro / packages / openneuro-app / src / scripts / dataset / dataset.store.js View on Github external
dismissJobsModal(success, snapshotId, appLabel, appVersion, jobId, history) {
    this.toggleModal('jobs')
    if (success) {
      if (snapshotId !== this.data.dataset._id) {
        let datasetId = this.data.dataset.original
          ? this.data.dataset.original
          : this.data.dataset._id
        const base = '/datasets/' + datasetId + '/versions/' + snapshotId
        const query = { app: appLabel, version: appVersion, job: jobId }
        const url = base + querystring(query)
        history.push(url)
      }
    }
  },

urlite

A very small, fast, dependency free url parser and formatter for nodejs and the web

UNLICENSED
Latest version published 2 years ago

Package Health Score

31 / 100
Full package analysis

Popular urlite functions