Embedded JavaScript templates.
NOTE: Version 2 of EJS makes some breaking changes with this version (notably, removal of the filters feature). Work on v2 is happening here: https://github.com/mde/ejs
File issues for EJS v2 here: https://github.com/mde/ejs/issues
$ npm install ejs
- Complies with the Express view system
- Static caching of intermediate JavaScript
- Unbuffered code for conditionals etc
<% code %>
- Escapes html by default with
<%= code %>
- Unescaped buffering with
<%- code %>
- Supports tag customization
- Filter support for designer-friendly templates
- Includes
- Client-side support
- Newline slurping with
<% code -%>
or<% -%>
or<%= code -%>
or<%- code -%>