0.4.0 • Published 5 years ago

stachitude v0.4.0

Weekly downloads
1
License
Apache-2.0
Repository
github
Last release
5 years ago

stachitude

A small, fast javascript template library inspired from Mustache and Handlebars.

Installation

$ npm install stachitude

Features

  • Server side rendering in Node
  • Compatibility with Express View System
  • Unit Tested using Ava
  • Small grammar, easy to use
  • AST Interpreting

Example

{{$include './header'}}

{{$if logged_in}}
    <div>Hello {{name}}</div>
    <button>Logout</button>
{{$else}}
    <button>Login</button>
{{$end}}

<div>
    Users Logged In:
    <br>
    <ul>
        {{$foreach user $in name_list}}
            <li>{{user | upperCase}}</li>
        {{$end}}
    </ul>
</div>

License

Licensed under the Apache License, 2.0