Embedded JavaScript templates -- http://ejs.co

Overview

Embedded JavaScript templates
Build Status Developing Dependencies Known Vulnerabilities

Installation

$ npm install ejs

Features

  • Control flow with <% %>
  • Escaped output with <%= %> (escape function configurable)
  • Unescaped raw output with <%- %>
  • Newline-trim mode ('newline slurping') with -%> ending tag
  • Whitespace-trim mode (slurp all whitespace) for control flow with <%_ _%>
  • Custom delimiters (e.g. [? ?] instead of <% %>)
  • Includes
  • Client-side support
  • Static caching of intermediate JavaScript
  • Static caching of templates
  • Complies with the Express view system

Example

<% if (user) { %>
  <h2><%= user.name %></h2>
<% } %>

Try EJS online at: https://ionicabizau.github.io/ejs-playground/.

Basic usage

let template = ejs.compile(str, options);
template(data);
// => Rendered HTML string

ejs.render(str, data, options);
// => Rendered HTML string

ejs.renderFile(filename, data, options, function(err, str){
    // str => Rendered HTML string
});

It is also possible to use ejs.render(dataAndOptions); where you pass everything in a single object. In that case, you'll end up with local variables for all the passed options. However, be aware that your code could break if we add an option with the same name as one of your data object's properties. Therefore, we do not recommend using this shortcut.

Options

  • cache Compiled functions are cached, requires filename
  • filename The name of the file being rendered. Not required if you are using renderFile(). Used by cache to key caches, and for includes.
  • root Set project root for includes with an absolute path (e.g, /file.ejs). Can be array to try to resolve include from multiple directories.
  • views An array of paths to use when resolving includes with relative paths.
  • context Function execution context
  • compileDebug When false no debug instrumentation is compiled
  • client When true, compiles a function that can be rendered in the browser without needing to load the EJS Runtime (ejs.min.js).
  • delimiter Character to use for inner delimiter, by default '%'
  • openDelimiter Character to use for opening delimiter, by default '<'
  • closeDelimiter Character to use for closing delimiter, by default '>'
  • debug Outputs generated function body
  • strict When set to true, generated function is in strict mode
  • _with Whether or not to use with() {} constructs. If false then the locals will be stored in the locals object. Set to false in strict mode.
  • destructuredLocals An array of local variables that are always destructured from the locals object, available even in strict mode.
  • localsName Name to use for the object storing local variables when not using with Defaults to locals
  • rmWhitespace Remove all safe-to-remove whitespace, including leading and trailing whitespace. It also enables a safer version of -%> line slurping for all scriptlet tags (it does not strip new lines of tags in the middle of a line).
  • escape The escaping function used with <%= construct. It is used in rendering and is .toString()ed in the generation of client functions. (By default escapes XML).
  • outputFunctionName Set to a string (e.g., 'echo' or 'print') for a function to print output inside scriptlet tags.
  • async When true, EJS will use an async function for rendering. (Depends on async/await support in the JS runtime.
  • includer Custom function to handle EJS includes, receives (originalPath, parsedPath) parameters, where originalPath is the path in include as-is and parsedPath is the previously resolved path. Should return an object { filename, template }, you may return only one of the properties, where filename is the final parsed path and template is the included content.

This project uses JSDoc. For the full public API documentation, clone the repository and run jake doc. This will run JSDoc with the proper options and output the documentation to out/. If you want the both the public & private API docs, run jake devdoc instead.

Tags

  • <% 'Scriptlet' tag, for control-flow, no output
  • <%_ 'Whitespace Slurping' Scriptlet tag, strips all whitespace before it
  • <%= Outputs the value into the template (escaped)
  • <%- Outputs the unescaped value into the template
  • <%# Comment tag, no execution, no output
  • <%% Outputs a literal '<%'
  • %%> Outputs a literal '%>'
  • %> Plain ending tag
  • -%> Trim-mode ('newline slurp') tag, trims following newline
  • _%> 'Whitespace Slurping' ending tag, removes all whitespace after it

For the full syntax documentation, please see docs/syntax.md.

Includes

Includes either have to be an absolute path, or, if not, are assumed as relative to the template with the include call. For example if you are including ./views/user/show.ejs from ./views/users.ejs you would use <%- include('user/show') %>.

You must specify the filename option for the template with the include call unless you are using renderFile().

You'll likely want to use the raw output tag (<%-) with your include to avoid double-escaping the HTML output.

<ul>
  <% users.forEach(function(user){ %>
    <%- include('user/show', {user: user}) %>
  <% }); %>
</ul>

Includes are inserted at runtime, so you can use variables for the path in the include call (for example <%- include(somePath) %>). Variables in your top-level data object are available to all your includes, but local variables need to be passed down.

NOTE: Include preprocessor directives (<% include user/show %>) are not supported in v3.0+.

Custom delimiters

Custom delimiters can be applied on a per-template basis, or globally:

let ejs = require('ejs'),
    users = ['geddy', 'neil', 'alex'];

// Just one template
ejs.render('<p>[?= users.join(" | "); ?]</p>', {users: users}, {delimiter: '?', openDelimiter: '[', closeDelimiter: ']'});
// => '<p>geddy | neil | alex</p>'

// Or globally
ejs.delimiter = '?';
ejs.openDelimiter = '[';
ejs.closeDelimiter = ']';
ejs.render('<p>[?= users.join(" | "); ?]</p>', {users: users});
// => '<p>geddy | neil | alex</p>'

Caching

EJS ships with a basic in-process cache for caching the intermediate JavaScript functions used to render templates. It's easy to plug in LRU caching using Node's lru-cache library:

let ejs = require('ejs'),
    LRU = require('lru-cache');
ejs.cache = LRU(100); // LRU cache with 100-item limit

If you want to clear the EJS cache, call ejs.clearCache. If you're using the LRU cache and need a different limit, simple reset ejs.cache to a new instance of the LRU.

Custom file loader

The default file loader is fs.readFileSync, if you want to customize it, you can set ejs.fileLoader.

let ejs = require('ejs');
let myFileLoad = function (filePath) {
  return 'myFileLoad: ' + fs.readFileSync(filePath);
};

ejs.fileLoader = myFileLoad;

With this feature, you can preprocess the template before reading it.

Layouts

EJS does not specifically support blocks, but layouts can be implemented by including headers and footers, like so:

<%- include('header') -%>
<h1>
  Title
</h1>
<p>
  My page
</p>
<%- include('footer') -%>

Client-side support

Go to the Latest Release, download ./ejs.js or ./ejs.min.js. Alternately, you can compile it yourself by cloning the repository and running jake build (or $(npm bin)/jake build if jake is not installed globally).

Include one of these files on your page, and ejs should be available globally.

Example

<div id="output"></div>
<script src="ejs.min.js"></script>
<script>
  let people = ['geddy', 'neil', 'alex'],
      html = ejs.render('<%= people.join(", "); %>', {people: people});
  // With jQuery:
  $('#output').html(html);
  // Vanilla JS:
  document.getElementById('output').innerHTML = html;
</script>

Caveats

Most of EJS will work as expected; however, there are a few things to note:

  1. Obviously, since you do not have access to the filesystem, ejs.renderFile() won't work.
  2. For the same reason, includes do not work unless you use an include callback. Here is an example:
let str = "Hello <%= include('file', {person: 'John'}); %>",
    fn = ejs.compile(str, {client: true});

fn(data, null, function(path, d){ // include callback
  // path -> 'file'
  // d -> {person: 'John'}
  // Put your code here
  // Return the contents of file as a string
}); // returns rendered string

See the examples folder for more details.

CLI

EJS ships with a full-featured CLI. Options are similar to those used in JavaScript code:

  • -o / --output-file FILE Write the rendered output to FILE rather than stdout.
  • -f / --data-file FILE Must be JSON-formatted. Use parsed input from FILE as data for rendering.
  • -i / --data-input STRING Must be JSON-formatted and URI-encoded. Use parsed input from STRING as data for rendering.
  • -m / --delimiter CHARACTER Use CHARACTER with angle brackets for open/close (defaults to %).
  • -p / --open-delimiter CHARACTER Use CHARACTER instead of left angle bracket to open.
  • -c / --close-delimiter CHARACTER Use CHARACTER instead of right angle bracket to close.
  • -s / --strict When set to true, generated function is in strict mode
  • -n / --no-with Use 'locals' object for vars rather than using with (implies --strict).
  • -l / --locals-name Name to use for the object storing local variables when not using with.
  • -w / --rm-whitespace Remove all safe-to-remove whitespace, including leading and trailing whitespace.
  • -d / --debug Outputs generated function body
  • -h / --help Display this help message.
  • -V/v / --version Display the EJS version.

Here are some examples of usage:

$ ejs -p [ -c ] ./template_file.ejs -o ./output.html
$ ejs ./test/fixtures/user.ejs name=Lerxst
$ ejs -n -l _ ./some_template.ejs -f ./data_file.json

Data input

There is a variety of ways to pass the CLI data for rendering.

Stdin:

$ ./test/fixtures/user_data.json | ejs ./test/fixtures/user.ejs
$ ejs ./test/fixtures/user.ejs < test/fixtures/user_data.json

A data file:

$ ejs ./test/fixtures/user.ejs -f ./user_data.json

A command-line option (must be URI-encoded):

./bin/cli.js -i %7B%22name%22%3A%20%22foo%22%7D ./test/fixtures/user.ejs

Or, passing values directly at the end of the invocation:

./bin/cli.js -m $ ./test/fixtures/user.ejs name=foo

Output

The CLI by default send output to stdout, but you can use the -o or --output-file flag to specify a target file to send the output to.

IDE Integration with Syntax Highlighting

VSCode:Javascript EJS by DigitalBrainstem

Related projects

There are a number of implementations of EJS:

License

Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)


EJS Embedded JavaScript templates copyright 2112 [email protected].

Comments
  • Is it possible to get the line number in the ejs errors?

    Is it possible to get the line number in the ejs errors?

    I originally posted this question on StackOverflow. This is the original post:

    (Suppose) I have a huge ejs file containing JavaScript snippets. When I compile it, I get the following error:

    SyntaxError: Unexpected token ) in mytemplate.ejs while compiling ejs

    While it's obvious there is a syntax error in my template, I can't know where the error is.

    I have full access to the error object so, I was thinking if somewhere the error contains the line with the problem (in a similar way like the JavaScript engines tell you that there is a problem on a specific line).

    I tried to access the err.stack field, but it only shows me the error origin (which comes from the ejs library), so that's not really helpful.

    Is there a way to know where the syntax error is in the ejs file?

    I'm using the ejs package.

    opened by IonicaBizau 36
  • options found in locals object. The option(s) is copied to the option object. This behavior is deprecated and will be removed in EJS 3

    options found in locals object. The option(s) is copied to the option object. This behavior is deprecated and will be removed in EJS 3

    Why locals is deprecated, any workaround in the future?

    function cpOptsInData(data, opts) {
      _OPTS.forEach(function (p) {
        if (typeof data[p] != 'undefined') {
          if (!optInDataWarned) {
            console.warn('options found in locals object. The option(s) is '
                       + 'copied to the option object. This behavior is '
                       + 'deprecated and will be removed in EJS 3');
            optInDataWarned = true;
          }
          opts[p] = data[p];
        }
      });
    }
    
    opened by dgofman 34
  • Layout support

    Layout support

    I've started to implement layout support for ejs and before I go too far down the rabbit hole I thought it would be worthwhile to get some feedback.

    In my fork of the repo I have started to add some test file for the possible layout syntax. The idea behind the syntax is based off of Laravel's templating engine.

    I have put together a few example use cases that will need to be tested against.

    Layout files

    Use cases

    What do you think?

    enhancement 
    opened by whitneyit 28
  • would you give a full example to show how to use include with expressjs?

    would you give a full example to show how to use include with expressjs?

    I write the code like this res.render('admin/user', { title: 'AB', description: "AB", categories: [{},{}],user:{},cur:"user"},{filename:'admin/user'});

    and html file as ejs like this . . . <% include sidebar.html %> . . but it do not work.

    also remove the {filename:'admin/user'} it still do not work.

    opened by yimity 23
  • Jquery GET request and variable

    Jquery GET request and variable

    Hi!

    I have a function which get an ejs page (from my ExpressJS server), and this works. But when I want to get the argument, I can't.

    Here is what I have tried :

    routes.js

    router.get('/', function(req, res, next) {
        req.session.lastPage = '/index';
        res.render('index', { lastPage: req.session.lastPage } );
    });
    

    index.ejs

    <html>
    ...
    <div id="ajax-page"></div>
    ...
    <!-- javascript imports -->
    </html>
    

    navigation.js

    $.get('/'+page)
            .done(function(data){
    
                    var template = ejs.compile(data);
    
                    $('#ajax-page').html( template(data) );     // Add to div
    
                    var lastPage = ejs.render('<% if (typeof lastPage !== "undefined") { %> <%= lastPage %> <% } else { %> lastPage <% } %>', data);
                    // var lastPage = ejs.render('<% if (typeof lastPage !== "undefined") { %> <%= lastPage %> <% } else { %> lastPage <% } %>', {data:lastPage});
                    console.log(lastPage);
    
            })
    
            .fail(function(){
                document.location.href="/";
            });
    }
    

    Result lastPage. If it works, I should have '/index'.

    question 
    opened by LM1LC3N7 20
  • mem-fs-editor's usage is broken in Pull request #129; passing filename as an array

    mem-fs-editor's usage is broken in Pull request #129; passing filename as an array

    Good day,

    We find error at lib/ejs.js:529:68 — property this.opts.filename could be Array and in this case we get this trace:

    TypeError: this.opts.filename.replace is not a function
        at Object.Template.generateSource (/home/dench/node_modules/generator-project-stub/node_modules/yeoman-generator/node_modules/mem-fs-editor/node_modules/ejs/lib/ejs.js:529:68)
        at Object.Template.compile (/home/dench/node_modules/generator-project-stub/node_modules/yeoman-generator/node_modules/mem-fs-editor/node_modules/ejs/lib/ejs.js:444:12)
        at Object.compile (/home/dench/node_modules/generator-project-stub/node_modules/yeoman-generator/node_modules/mem-fs-editor/node_modules/ejs/lib/ejs.js:289:16)
        at handleCache (/home/dench/node_modules/generator-project-stub/node_modules/yeoman-generator/node_modules/mem-fs-editor/node_modules/ejs/lib/ejs.js:148:16)
        at Object.exports.render (/home/dench/node_modules/generator-project-stub/node_modules/yeoman-generator/node_modules/mem-fs-editor/node_modules/ejs/lib/ejs.js:316:10)
        at copy.process (/home/dench/node_modules/generator-project-stub/node_modules/yeoman-generator/node_modules/mem-fs-editor/actions/copy-tpl.js:14:18)
        at applyProcessingFunc (/home/dench/node_modules/generator-project-stub/node_modules/yeoman-generator/node_modules/mem-fs-editor/actions/copy.js:13:16)
        at EditionInterface.exports._copySingle (/home/dench/node_modules/generator-project-stub/node_modules/yeoman-generator/node_modules/mem-fs-editor/actions/copy.js:51:16)
        at EditionInterface.<anonymous> (/home/dench/node_modules/generator-project-stub/node_modules/yeoman-generator/node_modules/mem-fs-editor/actions/copy.js:38:10)
        at Array.forEach (native)
    
    opened by denchistyakov 18
  • How to replace filter functionnality

    How to replace filter functionnality

    Hello,

    Due to release upgrade my code don't work anymore due to this piece of code: ejs.filters.toLocaleDateString = function(d) {...}

    I wonder how to replace the filters fonctionnality that was in V1 ? Have a guide line for doing that ?

    Thank's in advance,

    Jean-Marc

    opened by jmcollin78 16
  • added custom output function name

    added custom output function name

    According with #244 I've added a new option to define an output function name like echo or print. Example:

    <h1><% echo('hello world') %></h1>
    
    var ret = ejs.compile(string, {
        filename: path,
        outputFunctionName: 'echo'
    })(data);
    

    Any suggestion is welcome

    opened by oscarotero 15
  • Add an option to ignore all unneeded whitespace

    Add an option to ignore all unneeded whitespace

    Benchmarking shows that sometimes too many

    __output += "        \n";
    

    will have a very negative effect on performance. It is also one of the major reasons why doT is much faster than EJS, even though theoretically EJS is simpler.

    New line slurping does get rid of the new line, but then you still have

    __output += "        ";
    
    enhancement 
    opened by TimothyGu 15
  • Add missing template dependencies

    Add missing template dependencies

    This PR fix #426 and also fix #427. Those are different bugs but they are close so that they are fixed together.

    The added regex for parenthesis include can match those patterns :

    /^\s*include\(\s*['"](\S+)['"].*\)/
    
    include('../ejs/footer.ejs')
    include(   '../ejs/footer.ejs')
    include(  '../ejs/footer.ejs'   )
    include('../ejs/footer.ejs',    {woot:'bla'})
    include("../ejs/footer.ejs")
    include(   "../ejs/footer.ejs")
    include(  "../ejs/footer.ejs"   )
    include("../ejs/footer.ejs",    {woot:'bla'})
    
    opened by astik 13
  • Add async templates

    Add async templates

    This lets templates use await expressions, if ejs is given the option async and the environment supports it. Naturally, doing so changes the template function's return value to a Promise<string>.

    opened by na-sa-do 13
  • ejs doesn't throw error on unknown command-line option

    ejs doesn't throw error on unknown command-line option

    Try any arbitrary command and it just works:

    npx ejs file.ejs -o file.html --foo

    This is only my second time using EJS, so perhaps this is intended behavior, but I believe most tools would emit a help warning. If it is intended behavior, then the actual use case that caused me to find this should perhaps be addressed in some other way. I was changing the delimiter and using

    npx ejs file.ejs -m'|'

    It took me two days to figure out that I needed a space after -m :(

    opened by cwrichardson 0
  • Can ejs.renderFile use 'layouts'

    Can ejs.renderFile use 'layouts'

    This is a question on EJS and the renderFile.

    Currently, with the regular ejs.render we use a 'layout' file, then our 'template' of the page is injected into the body of that layout file. However, with renderFile, it seems to only take the 'single' file with passed arguments to render that file.

    The question is, can you actually use the 'layout' file, or is the idea to use a single 'file' vs the 'layout'?

    Just to add to this question and maybe get some thoughts on this. Basically, what we are looking to do is pass the rendering to a 'worker' thread. The main reason for this is to prevent 'blocking' during the page request. As it stands right now, many of our pages pass over an object returned from the DB where we then loop over the results. While this does work, we noticed it blocks the EL.

    We then used the async await functions of ejs however it was kind of a mixed bag where the blocking did seem to go away, however, if you had a heavy loop it still would block the EL (not surprising)

    This moved us into the direction of using a worker_thread to process the page using a worker pool.

    The general flow of this process is to

    1. Pass our data to the worker
    2. Inside the worker we call the EJS renderFile
    3. Pass the HTML back from the worker
    4. Route returns the HTML as a res.send(html)

    We have this partially working, in regards to returning the main content are (minus the layout, hence the first part of the question)

    Doing it this way allows the blocking to be a non-issue and with our internal testing we can have a 'long' running loop inside the template that does not impact the EL and other users.

    The second part to this question is, any downside to doing this with workers? And if layouts are not supported with the renderFile, would just constructing it as 'partials' be the best option, so we would have

    1. Template file
    2. Inside template file use 'includes' for {header} mainPageData {footer} ?

    For more clarity on the app, it currently is deployed in containers and we don't see any resource starvation and the EL blocks are small, like 30 MS, however under load that is still not ideal, so off loading that so it does not impact other users is the goal here.

    Anyhow, maybe we missed something and this is the totally wrong approach but wanted to see if anyone else experienced things like this and worked around it etc.

    opened by webdpro 0
  • please remvove jake as not needed in production - fixes CVE-2021-43138

    please remvove jake as not needed in production - fixes CVE-2021-43138

    Due to the build only dependency "jake"" a multiple additional not needed dependencies are fetched into EJS. Now latest version of jake depends on insecure async package (CVE-2021-43138). Removing jake and restoring no-dep only state as old 2.x version of ejs will silence a lot of noise from different security scanner and people will not need to invest time checking if its really vulnerable or some whitelists needs to be updated.

    OTOH whitelisting this vulnerability for ejs/jake will silence the alarm for other possible real threats/dependencies too and is not really an option...

    Thanks in advance, S. Seide

    opened by dev-trilobyte 10
  • jsdocs

    jsdocs

    I get many messages with "Adjacent JSX elements must be wrapped in an enclosing tag." while I use ejs. Is there a way in jsdocs to make it clear not to harrass me with jsx messages?

    My jsdoc config starts as follows: "_comment": "Configuration file for JSDoc.", "source": { "includePattern": ".+\.(e)js(doc)?$",

    I also get Unexpected token (5:9) for ejs "include" statements

    opened by ourmaninindia 0
  • A clean, full ES6 version of EJS, without changing the codebase

    A clean, full ES6 version of EJS, without changing the codebase

    It took me a while, but I got there. I am not submitting a PR because I am still working out kinks, and I would like to talk to you about how to go about it. The short version: I did it! Have a look here: https://github.com/mobily-enterprises/ejs4b It converts ejs into ES6 modules. Please note that it DOESN'T minify/etc. the only real changes there are in the fact that some of Node's calls are stubbed. Basically Rollup is doing what Browserify does. I can't say whether it does it "better" or not, but I can tell you they put a lot of work into this. So... options:

    (1) The non-committal way

    We keep this as a separate repo. I will set up some kind of hook so that the version us updated automatically (I hate it when things like this stop working after 2, 3 years). Ideally, you'd put a link

    (2) The integration way

    You can easily take my rollup.config.js and simply add it to your repository. I would call the end result ejs-es.js. So, you will have 3 files: /lib/ejs.js (node, unminified), /ejs.js (browser, unminified), /ejs-min.js (browser, minified) and the NEW /ejs-es.js (browser, unminified, ES6). The naming makes sense. Also, please note that there is no point in minifying the ES version, since it's meant to be built/included using tooling.

    I think people would be happier if you went for (2). However, it depends on you. Please have a look at my repo (which is totally minimal) and let me know which way you want to go.

    Thank you!

    opened by mercmobily 8
Releases(v3.1.8)
Owner
Matthew Eernisse
Literal rock star developer. JavaScript, music, Japanese, and serial commas. Author and maintainer of EJS.
Matthew Eernisse
Embedded CoffeeScript templates

Eco: Embedded CoffeeScript templates Eco lets you embed CoffeeScript logic in your markup. It's like EJS and ERB, but with CoffeeScript inside the <%

Sam Stephenson 1.7k Jan 2, 2023
A simple boilerplate for Express + EJS projects.

Express + EJS Boilerplate This is a simple boilerplate for Express + EJS projects. ?? Summary Install Basic Structure Technologies Preview ??️ Install

null 4 Apr 28, 2022
Semi-embedded JS template engine that supports helpers, filters, partials, and template inheritance. 4KB minzipped, written in TypeScript ⛺

squirrelly Documentation - Chat - RunKit Demo - Playground Summary Squirrelly is a modern, configurable, and blazing fast template engine implemented

Squirrelly 451 Jan 2, 2023
Embedded JS template engine for Node, Deno, and the browser. Lighweight, fast, and pluggable. Written in TypeScript

eta (η) Documentation - Chat - RunKit Demo - Playground Summary Eta is a lightweight and blazing fast embedded JS templating engine that works inside

Eta 682 Dec 29, 2022
A simpler static site generator. An alternative to Jekyll. Transforms a directory of templates (of varying types) into HTML.

eleventy ?? ⚡️ A simpler static site generator. An alternative to Jekyll. Written in JavaScript. Transforms a directory of templates (of varying types

Eleventy 13.4k Jan 4, 2023
My templates for the Templater Obsidian.md plugin.

Christian's Templater Templates Found a template your like? Make sure you copy the raw file - not what Github renders. Click this button to see the ra

Christian Bager Bach Houmann 151 Dec 21, 2022
A set a periodic note templates for Obsidian.md.

MK's Periodic Note Templates A set of periodic note templates for Obsidian.md. Before You Start... Please note that these templates generally suit my

null 134 Dec 30, 2022
Browser In The Browser (BITB) Templates

BITB Browser templates for Browser In The Browser (BITB) attack. More information: https://mrd0x.com/browser-in-the-browser-phishing-attack/ Usage Eac

mrd0x 2.5k Jan 5, 2023
Minimal templating with {{mustaches}} in JavaScript

mustache.js - Logic-less {{mustache}} templates with JavaScript What could be more logical awesome than no logic at all? mustache.js is a zero-depende

Jan Lehnardt 15.7k Jan 7, 2023
The fastest + concise javascript template engine for nodejs and browsers. Partials, custom delimiters and more.

doT Created in search of the fastest and concise JavaScript templating function with emphasis on performance under V8 and nodejs. It shows great perfo

Laura Doktorova 4.9k Dec 31, 2022
Asynchronous Javascript templating for the browser and server

Dust.js Asynchronous Javascript templating for the browser and server. This fork is maintained by LinkedIn. Install NPM Important: We recommend that y

LinkedIn 2.9k Dec 31, 2022
1KB lightweight, fast & powerful JavaScript templating engine with zero dependencies. Compatible with server-side environments like node.js, module loaders like RequireJS and all web browsers.

JavaScript Templates Contents Demo Description Usage Client-side Server-side Requirements API tmpl() function Templates cache Output encoding Local he

Sebastian Tschan 1.7k Jan 3, 2023
A tiny javascript templating framework in ~400 bytes gzipped

t.js A tiny javascript templating framework in ~400 bytes gzipped t.js is a simple solution to interpolating values in an html string for insertion in

Jason Mooberry 823 Dec 29, 2022
Take a swig of the best template engine for JavaScript.

NOT MAINTAINED Fork and use at your own risk. Swig Swig is an awesome, Django/Jinja-like template engine for node.js. Features Available for node.js a

Paul Armstrong 3.1k Jan 4, 2023
HTML Framework that allows you not to write JavaScript code.

EHTML (or Extended HTML) can be described as a set of custom elements that you can put on HTML page for different purposes and use cases. The main ide

Guseyn Ismayylov 172 Dec 22, 2022
handlebars.js 8.8 4.4 L3 JavaScript An extension to the Mustache templating language.

Handlebars.js Handlebars provides the power necessary to let you build semantic templates effectively with no frustration. Handlebars is largely compa

The Handlebars Templating Language 16.9k Jan 5, 2023
Asynchronous Javascript templating for the browser and server

Dust.js Asynchronous Javascript templating for the browser and server. This fork is maintained by LinkedIn. Install NPM Important: We recommend that y

LinkedIn 2.9k Dec 31, 2022
A helper to send whatsapp without scheduling a contact, the project developed using TDD with Jest, Javascript classes, BotstrapVue and SweetAlert.

Project setup npm install Compiles and hot-reloads for development npm run serve Compiles and minifies for production npm run build Lints and fixes

Magascript 7 Sep 13, 2022
Variation-template - Variation is a PSD template that is covered into a web template using HTML5, CSS3, Bootstrapv4.6, JavaScript.

Variation Template Design Variation is a PSD website template. In this project this template is designed with HTML. Deployment This site is deployed a

Bipronath Saha 1 Jan 1, 2022