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

handlebars-engine

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

handlebars-engine

template engine with handlebars.js

  • 0.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-20%
Maintainers
1
Weekly downloads
 
Created
Source

handlebars-engine

Template engine with handlebars.js extracted out of consolidate.js.

Disclaimer

All credit goes to consolidate.js and its contributors. Everything in here was extracted from there and nothing here includes any original work by me. The only difference here is that the template engine itself is exported.

Why

I wanted a handlebars.js template engine to use with express that was responsible for only handlebars.js and nothing else. I encountered no issues at all from consolidate.js which is why this does not include any extra features or a different implementation.

This was also a learning exercise for me to get a better understanding of consolidate.js's implementation.

Express 3.x Example

var express = require('express');
var handlebars = require('handlebars-engine');
// ...

app.engine('hbs', handlebars);
app.set('views', __dirname + '/views');
app.set('view engine', 'hbs');

// ...

app.get('/', function(req, res) {
  res.render('index', {
    name: 'Thor',
    partials: {
      header: 'header',
      footer: 'footer'
    },
    helpers: {
      yell: function(object) {
        return object + "!!";
      }
    }
  });
});

// ...

LICENSE

MIT

Keywords

FAQs

Package last updated on 17 Oct 2013

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc