🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

tumblate

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tumblate

A tumblr template rendering library

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

Tumblate Build Status

A tumblr template rendering library. Written in ES2015 and without dependencies.

Installation

Tumblate is available on npm. Just run:

npm install --save tumblate

Examples

There are two ways to get started, either by creating a reusable instance of the Template class or by using the render function.

templateSrc = 'Welcome to {Title}.{block:Description} It is about: {Description}{/block:Description} Have a nice day!'
data = {
  Title: 'My Blog',
  Description: 'Nothing special. Just random things.'
}

// ES2015
import {Template, render} from 'tumblate';

let template = new Template(templateSrc);
console.log(template.render(data));

console.log(render(templateSrc, data));

// CommonJS
var tumblate = require('tumblate');

var template = new tumblate.Template(templateSrc);
console.log(template.render(data));

console.log(tumblate.render(templateSrc, data));

Keywords

tumblr

FAQs

Package last updated on 18 Jan 2016

Did you know?

Socket

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