How to use the inferno-server.streamAsString 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-stream.spec.server.jsx View on Github external
return new Promise(function(res, rej) {
    streamAsString(dom)
      .on('error', rej)
      .pipe(
        concatStream(function(buffer) {
          res(buffer.toString('utf-8'));
        })
      );
  });
}

inferno-server

Provides methods to render HTML strings from Inferno elements

MIT
Latest version published 1 year ago

Package Health Score

71 / 100
Full package analysis