How to use the inferno-server.streamQueueAsString function in inferno-server

To help you get started, we’ve selected a few inferno-server 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 infernojs / inferno / packages / inferno-server / __tests__ / creation-queuestream.spec.server.jsx View on Github external
return new Promise(function(res, rej) {
    const chunks = [];
    streamQueueAsString(dom)
      .on('error', rej)
      .on('data', chunk => {
        chunks.push(chunk.toString());
      })
      .pipe(
        concatStream(function(buffer) {
          res([chunks, buffer.toString('utf-8')]);
        })
      );
  });
}

inferno-server

Provides methods to render HTML strings from Inferno elements

MIT
Latest version published 5 months ago

Package Health Score

84 / 100
Full package analysis