How to use the event-stream.mapSync function in event-stream

To help you get started, we’ve selected a few event-stream 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 perliedman / reproject / cli.js View on Github external
function readStream() {
    if ((fromCrs && toCrs) || (!argv.from && !argv.to)) {
        var inputStream = ((argv._[0] && fs.createReadStream(argv._[0])) || process.stdin)
        var parser = geojsonStream.parse()
            .on('header', handleHeader)
        var transformStream = es.mapSync(transform)
        var outputStream = geojsonStream.stringify()

        inputStream.pipe(parser)
        parser.pipe(transformStream)
        transformStream.pipe(outputStream)
        outputStream.pipe(process.stdout)
    }
}
github Janpot / gulp-htmlbuild / lib / preprocess / css.js View on Github external
return function (block) {

    function templateCss(path) {
      var template = block.indent + '';
      return util.format(template, path);
    }


    var extractCssStream = es.mapSync(extractCss),
        templateCssStream = es.mapSync(templateCss);


    block.pipe(extractCssStream);
    templateCssStream.pipe(block);

    buildFn(es.duplex(templateCssStream, extractCssStream));
  };
};

event-stream

construct pipes of streams of events

MIT
Latest version published 6 years ago

Package Health Score

61 / 100
Full package analysis