I'd like to use a method (from jsonist) with the following structure:
jsonist.get(uri, options, callback)
uri and options are needed (options for passing a certain header)
However I'm not certain that Highland's wrapCallback can handle the two options here (minus the callback)
const H = require('highland')
const req = H.wrapCallback(jsonist.get)
req(uri, options).apply(H.log)
With this the stream is logged, not the data
Is there a better way to do this?
You can either specify the params inside
wrapCallback:Or you could use a generator directly if the callback has artiy > 2: