Skip to content

Instantly share code, notes, and snippets.

@oleics
Created June 12, 2012 20:26
Show Gist options
  • Save oleics/2919922 to your computer and use it in GitHub Desktop.
Save oleics/2919922 to your computer and use it in GitHub Desktop.
dustjs: chunk WriteStream Interface
module.exports = plugin
var request = require('request')
function plugin(chunk, context, bodies, params) {
return chunk.map(function(chunk) {
request
( { method: 'GET'
, uri: 'http://localhost:2001/useyourimagination/'
}
).pipe(chunk)
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment