Skip to content

AtomicNoggin/handlebars-async

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Handlebars-Async

Make clientside Handlebars async!

an in browser implementation of https://github.com/LoicMahieu/handlebars-async

Install

copy lib/handlebars.js to your server.

include it in your project after the main Handlebars file.

Usage

handlebarsAsync(Handlebars);
Handlebars.registerHelper('async', function(arg1) {
  var done = this.async();

  setTimeout(function() {
    done(null, arg1.toUpperCase())
    done();
  }, 1000);
});

var tpl = Handlebars.compile('{{asyncHelper "value"}}');

tpl(function (err, result) {
  // result == "VALUE"
});

About

Make Handlebars async!

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 87.9%
  • Makefile 12.1%