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

js-template

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-template - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

index.js

4

package.json
{
"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>
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