How to use the scramjet.DataStream.pipeline 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 openaq / openaq-fetch / adapters / eea-direct.js View on Github external
function getBattutaStream () {
  if (!_battuta) {
    const requestObject = request({url: stationsLink});
    _battuta = DataStream
      .pipeline(
        requestObject,
        JSONStream.parse('*')
      )
      .catch(e => {
        requestObject.abort();
        e.stream.end();
        throw e;
      })
      .keep(Infinity);
  }

  return _battuta.rewind();
}

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