How to use the lazystream.Writable function in lazystream

To help you get started, we’ve selected a few lazystream 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 djfun / mc-map-item-tool / src / server / server.js View on Github external
zlib.gzip(nbtData, function(err, data) {
        if (err) {
          let error = new Error('Error while creating map file');
          error.http_code = 500;
          error.zlib_error = err;
          throw error;
        let writeStream = new lazystream.Writable(function () {
          return fs.createWriteStream(`${TMP_DIR}${filename}.dat`)
            .on('close', function () {
              winston.log('info', `Map file written to disk: ${filename}.dat`);
              res.setHeader('Content-Type', 'text/html');
    } catch (e) {


Open Node Streams on demand.

Latest version published 2 years ago

Package Health Score

65 / 100
Full package analysis

Popular lazystream functions