Socket
Socket
Sign inDemoInstall

@buxlabs/html-engine

Package Overview
Dependencies
19
Maintainers
3
Versions
35
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @buxlabs/html-engine

html engine


Version published
Maintainers
3
Created

Readme

Source

html-engine

Codeship Status for buxlabs/html-engine

Installation

npm install @buxlabs/html-engine

Usage

const { compile } = require('@buxlabs/html-engine')
const template = compile('<div>{foo}</div>')
assert(template({ foo: 'bar' }) === '<div>bar</div>')

Features

<if foo>
  Hello, world!
</if>
<if foo>
  Hello, world!
</if>
<else>
  42
</else>
<if foo>
  Hello, world!
</if>
<elseif bar>
  42
</elseif>
<if foo and bar>
  Hello, world!
</if>
<if foo or bar>
  Hello, world!
</if>
<each photo in photos>
  <img src='{photo.src}'>
</each>
<ul>
<for month in months>
  <li>{month}</li>
</for>
</ul>
<unless foo>
  Hello, world!
</unless>
<unless foo>
  Hello, world!
</unless>
<else>
  42
</else>
<unless foo>
  Hello, world!
</unless>
<elseunless bar>
  42
</elseunless>
<if foo is present>
  Hello, world!
</if>
<if foo is positive>
  Hello, world!
</if>
<if foo is negative>
  Hello, world!
</if>
<if foo is finite>
  Hello, world!
</if>
<if foo is infinite>
  Hello, world!
</if>
<if foo is empty>
  Hello, world!
</if>
<if foo is an array>
  Hello, world!
</if>
<if foo is a string>
  Hello, world!
</if>
<if foo is a number>
  Hello, world!
</if>
<if foo is a symbol>
  Hello, world!
</if>
<if foo is a map>
  Hello, world!
</if>
<if foo is a set>
  Hello, world!
</if>
<if foo is a boolean>
  Hello, world!
</if>
<if foo is undefined>
  Hello, world!
</if>
<if foo is void>
  Hello, world!
</if>
<if foo is null>
  Hello, world!
</if>
<if foo is an object>
  Hello, world!
</if>
<if foo is not present>
  Hello, world!
</if>
<if foo is not empty>
  Hello, world!
</if>

License

MIT

Keywords

FAQs

Last updated on 08 Aug 2018

Did you know?

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc