0.0.2 • Published 10 years ago

templatinglanguage v0.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

templatinglanguage

A simple templating language written as part of a tutorial on JavaScript.

var parse = require('templatinglanguage');
var template = parse('hello {{ world }}');
var context = {world: '?'};

console.log(template(context));  // === 'hello ?'

API

parse = require('templatinglanguage') -> function(str)

returns a function that accepts a string to parse it into a templating function.

parse(str) -> function(context)

returns a function that accepts context to render a string.

LICENSE

MIT

0.0.2

10 years ago

0.0.1

11 years ago

0.0.0

11 years ago