js-template
Advanced tools
Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "js-template", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Rewritten and Improved John Resig's micro javascipt template", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "npm test" | ||
"test": "node test.js" | ||
}, | ||
@@ -9,0 +9,0 @@ "repository": { |
# js-template | ||
Rewritten and Improved John Resig's micro javascipt template | ||
js-template is based on John Resig's microTemplate function. However the orinal version has got to be improved. | ||
- No error with single quote | ||
- Better error message wth line number | ||
- Whitespace as the same as template, no more single line output | ||
- Less undefined variable errors | ||
Install | ||
------- | ||
npm install js-template | ||
Example | ||
-------- | ||
var jsTemplate = require('js-template'); | ||
var templateHtml = "Hello <b><%= world %></b>"; | ||
var data = {world: "You!!"}; | ||
var output = jsTemplate(templateHrml, data); | ||
console.log(output); // Hello <b>You!!</b> | ||
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
4500
4
103
26
0
1