How to use the scramjet.fromArray function in scramjet

To help you get started, we’ve selected a few scramjet 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 probot / no-response / lib / no-response.js View on Github external
async getClosableIssues () {
    const {owner, repo} = this.context.repo()
    const {daysUntilClose, responseRequiredLabel} = this.config
    const q = `repo:${owner}/${repo} is:issue is:open label:"${responseRequiredLabel}"`
    const params = {q, sort: 'updated', order: 'desc', per_page: 30}
    const labeledEarlierThan = this.since(daysUntilClose)

    const issues = await this.github.search.issues(params)
    const closableIssues = scramjet.fromArray(issues.data.items).filter(async issue => {
      const event = await this.findLastLabeledEvent(owner, repo, issue.number)
      const creationDate = new Date(event.created_at)

      return creationDate < labeledEarlierThan
    }).toArray()
    return closableIssues
  }

scramjet

Lightweight and real-time data functional stream programming framework like event-stream, written in ES6 using async await with multi-threading and typescript support

MIT
Latest version published 8 months ago

Package Health Score

62 / 100
Full package analysis