New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

beardo

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

beardo

The best mustaches were beards first.

0.0.5
Source
npm
Version published
Weekly downloads
3
-25%
Maintainers
1
Weekly downloads
 
Created
Source

beardo

Provides an easy way to use layout aware mustache templates in your node.js projects. Add mustache files to a templates directory and use beardo's methods to asynchronously read and render them as appropriate.

If you are using one of the http handlers (beardo.middleware, beardo.handler) ETags get automatically added and 304 responses occur based on the if-none-match request header.

beardo.handler(res, req, [options])

Adds a Templar style response handler.

var beardo = require('beardo')
  , beardopts = { directory: path.join(__dirname, './templates')
    , stamp: 'stamp-' + process.pid
    }

http.createServer(function(req, res) {
  res.template = beardo.handler(req, res, beardopts)

  // Meanwhile
  res.template('heyo', { foo: 'bar, layout: 'html' })
})

Options

  • directory: The directory that holds the mustache files
  • stamp: Gets added to the response header as x-beardo-stamp to aid in debugging

LICENSE (MIT)

Keywords

mustache

FAQs

Package last updated on 09 Nov 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts