Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

18 lines (11 sloc) 0.371 kb
BufferStream = require 'bufferstream'
##
# useful for rendering a template directly into a response:
# render(new Template(schema:'html5', body).pipe(res))
render = (template) ->
buffer = new BufferStream size:'flexible', disabled:yes
template.on 'data', buffer.write
template.on 'end' , buffer.end
return buffer
# exports
module.exports = render
Jump to Line
Something went wrong with that request. Please try again.