pretemplater

1.1.2 • Public • Published

pretemplater

Because I wanted to define my own syntax, but still use simple templating from lodash.

<% loop items as item %>
    <% if item.name %>
        <%= item.name %>
    <% /if %>
<%  /loop %>

ends up being:

<% items.forEach(function(item) { %>
    <% if (item.name) %>
        <%= item %>
    <% } %>
<%  } %>

usage

var pretemplater = require("pretemplater");

var readyForLodash = pretemplater("some string");

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.2
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.2
    1

Package Sidebar

Install

npm i pretemplater

Weekly Downloads

1

Version

1.1.2

License

none

Last publish

Collaborators

  • shakyshane