UNPKG

yahoi

Version:

Yet Another Highly Opinionated Isomorphic Framework

16 lines (13 loc) 323 B
import Handlebars from 'handlebars'; export default class StringRenderer { constructor(props) { this.str = props.string; this.data = props.data; } render() { return new Promise((fulfill, reject) => { let template = Handlebars.compile(this.str); fulfill(template(this.data)); }); } }