1.1.4 • Published 10 years ago

template-linker v1.1.4

Weekly downloads
1
License
MIT
Repository
-
Last release
10 years ago

Simple package that provides an angularjs-way of linking templates to models

Its usage is pretty straightforward

var link = require('template-linker').link;

var saalihou = {name: 'saalihou', age: 5};
var linked = link('Hello [user.name]. In 8 years you will be [user.age + 8].', {user: saalihou});

console.log(linked);

// Hello saalihou. In 8 years you will be 13.

If you want to use literal square brackets, you can escape them with the \ character.

Note: beware, in JavaScript, the \ character in itself needs to be escaped. So you would actually write \\[ instead of \[ if your template is a JavaScript string.

Your contribution is welcome :).

1.1.4

10 years ago

1.1.3

10 years ago

1.1.2

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago