Skip to content

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

Notifications You must be signed in to change notification settings

hackygolucky/templatingLanguage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Tracy Abrahms
May 16, 2014
f94db4e · May 16, 2014

History

12 Commits
Jan 22, 2013
May 16, 2014
May 16, 2014
May 16, 2014

Repository files navigation

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

About

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

Resources

Stars

Watchers

Forks

Packages

No packages published