Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

browserify-hogan

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browserify-hogan - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

7

index.js

@@ -7,3 +7,8 @@ var hogan = require('hogan.js'),

var wrap = function (template) {
return 'module.exports = new (require(\'hogan.js/lib/template\').Template)(' + template + ');'
return (
'var template = new (require(\'hogan.js/lib/template\')).Template(' + template + ');' +
'module.exports = {' +
' render: function () { return template.render.apply(template, arguments); }' +
'};'
);
}

@@ -10,0 +15,0 @@

2

package.json

@@ -11,3 +11,3 @@ {

],
"version": "0.1.0",
"version": "0.1.1",
"license": "MIT",

@@ -14,0 +14,0 @@ "repository": {

@@ -7,3 +7,3 @@ # browserify-hogan [![Build Status](https://secure.travis-ci.org/unfold/browserify-hogan.png?branch=master)](http://travis-ci.org/unfold/browserify-hogan)

Give your template an extension of `.ms`, `.mustach`, `.hogan`, `.hg`, or `.html`.
Give your template an extension of `.ms`, `.mustache`, `.hogan`, `.hg`, or `.html`.

@@ -10,0 +10,0 @@ In module `foo.js` require your template:

@@ -1,2 +0,2 @@

var template = require('./template.ms');
console.log(template.render({name: 'Dave'}));
var render = require('./template.ms').render;
console.log(render({name: 'Dave'}));

@@ -10,5 +10,9 @@ var exec = require('child_process').exec,

console.log('Testing with command:', command);
exec(command, function (err, stdout, stderr) {
assert(!err && !stderr, 'No errors in Browserify or when executing bundle');
assert.strictEqual(stdout.trim(), 'Hello Dave!', 'Template renders correctly');
console.log('Test complete.');
});
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