mirror of
https://github.com/jsbin/jsbin.git
synced 2026-01-25 15:38:56 +00:00
15 lines
353 B
JavaScript
15 lines
353 B
JavaScript
'use strict';
|
|
var hbs = require('hbs'),
|
|
features = require('./features'),
|
|
path = require('path');
|
|
|
|
hbs.registerPartials(path.resolve(__dirname + '/../views/partials'));
|
|
|
|
hbs.registerHelper('feature', function(user, flag, options) {
|
|
if (features(flag, { session: { user: user } })) {
|
|
return options.fn(this);
|
|
}
|
|
});
|
|
|
|
|
|
module.exports = hbs; |