Socket
Book a DemoInstallSign in
Socket

simplet

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simplet

Simple Template Engine

0.2.1
latest
Source
npmnpm
Version published
Weekly downloads
19
-47.22%
Maintainers
1
Weekly downloads
 
Created
Source

0.2.1

simpleT is a simple template engine for Node.JS and web browsers that has some special features:

  • Simple structure with minimum configuration
  • Embedded JavaScript support
  • Client-side support
  • High performance
  • Customizable code delimiters
  • Global values injection
  • Dynamic caching
  • Includes
  • Result without redundant whitespace

Works in Node.JS 0.10+

Any feedback is welcome!

More simple modules:

Changelog

Documentation

Instalation

npm install simplet

Usage

var simplet = require('simplet');

var engine = simplet();

// Create the template
engine.template('template.ejs', 'Hello, <% print(name) %>');

// Render the template
engine.render('template.ejs', {
    name: 'simpleT'
});

//=> Hello, simpleT

// Remove the template
engine.clear('template.ejs');

Syntax

  • code tag <% code %>
  • print tag <%- data %> or <% print(data) %>
  • print tag with XML escape <%= data %> or <% printx(data) %>
  • include tag <%@ template %> or <% include(template) %>
  • comment tag <%# code %>

Keywords

client-side

FAQs

Package last updated on 22 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.