Created
July 28, 2016 14:33
-
-
Save despairblue/c32f227cc34859c46f7030620c35985b to your computer and use it in GitHub Desktop.
does not work with node > 5.9.1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
const imageSizeStream = require('image-size-stream') | |
const fs = require('fs') | |
const through2 = require('through2') | |
const s = fs.createReadStream('./test/http/listings/fixtures/image-upload/weird.jpg') | |
const s2 = through2(s) | |
const is = imageSizeStream({ limit: Infinity }) | |
.on('size', console.log) | |
.on('error', console.error) | |
const is2 = imageSizeStream({ limit: Infinity }) | |
.on('size', console.log) | |
.on('error', console.error) | |
// s.pipe(is) | |
s2.pipe(is2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment