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

20 lines (15 sloc) 0.439 kb
BufferStream = require 'bufferstream'
Stream = require 'stream'
streamify = require 'dt-stream'
##
# useful for rendering a template directly into a response:
# render(new Template(schema:'html5', body).pipe(res))
render = (template) ->
buffer = new BufferStream
encoding:'utf-8'
size:'flexible'
disabled:yes
streamify(template).stream.pipe(buffer)
return buffer
# exports
module.exports = render
Jump to Line
Something went wrong with that request. Please try again.