How to use the multipipe function in multipipe

To help you get started, we’ve selected a few multipipe 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 thenickdude / chickenpaint / test / compare_against_reference / index.es6.js View on Github external
} else {
                        let
                            maxDifference = TestUtil.bitmapMaxDifference(fusion, pngImage),
                            chickenPaintPNG = new PNG({
                                width: this.width,
                                height: this.height
                            });

                        console.log(chiName + " max difference " + maxDifference);
                        failures++;

                        chickenPaintPNG.data.set(fusion.data);

                        // fs.writeFileSync(filenameRoot + ".chickenpaint.raw", chickenPaintPNG.data, { defaultEncoding: null });

                        pipe(chickenPaintPNG.pack(), fs.createWriteStream(filenameRoot + ".chickenpaint.png", {defaultEncoding: null}), (err) => {
                            if (err) {
                                reject(err);
                            } else {
                                resolve();
                            }
                        });
                    }
                });
            }));
github SassDoc / sassdoc / src / sassdoc.js View on Github external
return new Promise((resolve, reject) => {
      pipe(...streams, err =>
        err ? reject(err) : resolve())
      .resume() // Drain.
    })
  }
github SassDoc / sassdoc / src / sassdoc.js View on Github external
function stream (env) {
    let parseStream = parseFilter(env)

    let filter = through.obj((file, enc, cb) => cb(), function (cb) {
      parseStream.promise.then(data => {
        this.push(data)
        cb()
      }, cb)
    })

    return pipe(parseStream, filter)
  }
}
github threepointone / glamor-stream / src / index.js View on Github external
Object.keys(ids).forEach(id => {
        css.push(styleSheet.inserted[id].join(''))
      })

      if(css){
        this.queue(`<style data-glamor-chunk="">${css.join('')}</style>`)
      }
    }
    this.queue(data)

  }, function end(){
    this.queue(null)
  })

  return pipe(tokenStream, inlineStream)
}
github emotion-js / emotion / packages / create-emotion-server / src / stream.js View on Github external
if (css !== '') {
          this.queue(
            `<style>${css}</style>`
          )
        }
      }
      this.queue(data)
    },
    function end() {
      this.queue(null)
    }
  )

  return pipe(
    tokenStream,
    inlineStream
  )
}

multipipe

pipe streams with centralized error handling

MIT
Latest version published 4 years ago

Package Health Score

67 / 100
Full package analysis

Popular multipipe functions

Similar packages