browserify-hogan
Advanced tools
Comparing version 0.0.3 to 0.1.0
12
index.js
@@ -6,15 +6,15 @@ var hogan = require('hogan.js'), | ||
var wrap = function(template) { | ||
return 'module.exports=(function() {var Template = require(\'hogan.js/lib/template\').Template;var template = new Template(' + template + ');return function(data) {return template.render(data)}}());' | ||
var wrap = function (template) { | ||
return 'module.exports = new (require(\'hogan.js/lib/template\').Template)(' + template + ');' | ||
} | ||
module.exports = function(file) { | ||
if (!filenamePattern.test(file)) return through() | ||
module.exports = function (file) { | ||
if (!filenamePattern.test(file)) return through(); | ||
var input = '' | ||
var write = function(buffer) { | ||
var write = function (buffer) { | ||
input += buffer | ||
} | ||
var end = function() { | ||
var end = function () { | ||
this.queue(wrap(hogan.compile(input, {asString: true}))) | ||
@@ -21,0 +21,0 @@ this.queue(null) |
@@ -11,3 +11,3 @@ { | ||
], | ||
"version": "0.0.3", | ||
"version": "0.1.0", | ||
"license": "MIT", | ||
@@ -18,6 +18,12 @@ "repository": { | ||
}, | ||
"scripts": { | ||
"test": "node test/test" | ||
}, | ||
"dependencies": { | ||
"through": "~2.2.7", | ||
"hogan.js": "~2.0.0" | ||
}, | ||
"devDependencies": { | ||
"browserify": "~3.30.1" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3787
9
31
48
1
2