Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

How to use streams? #4

balupton opened this Issue Nov 7, 2011 · 1 comment


None yet
2 participants

balupton commented Nov 7, 2011

I can't figure out how to use streams?

I want to pass a string, and then on the callback read the generated output. But I just can't figure out how :-(

Before you could do something like this:

html2ckConvertor.convert file.content, (err,content) ->
    next err  if err
    file.content = content

brandonbloom commented Nov 7, 2011

The current interface doesn't support streams. See how I just use readFileSync:

html = fs.readFileSync sourceFile, 'utf8'

I think the underlying html parser does support streams, so if you want to take a crack at adding support for it, please feel free.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment