Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/a/mnml-tpl

Hello :username, :repository is tiny string template engine
https://github.com/a/mnml-tpl

javascript template-engine tiny

Last synced: 6 days ago
JSON representation

Hello :username, :repository is tiny string template engine

Awesome Lists containing this project

README

        

# Minimal Templates

[![Build Status](https://travis-ci.org/rambler-digital-solutions/mnml-tpl.svg?branch=master)](https://travis-ci.org/rambler-digital-solutions/mnml-tpl)

Replace all `:keys` in string with given object.

## Install

```
npm i -S mnml-tpl
```

## Examples

```js
var tpl = require('mnml-tpl');

var locals = { host: 'world', user: 'hello' };
var template = 'ssh :user@:host';
tpl(template)(locals); // ssh hello@world
```

## License

MIT