ember-source
Version:
A JavaScript framework for creating ambitious web applications
25 lines (22 loc) • 677 B
JavaScript
// STATE within a module is frowned upon, this exists
// to support Ember.TEMPLATES but shield ember internals from this legacy
// global API.
let TEMPLATES = {};
function setTemplates(templates) {
TEMPLATES = templates;
}
function getTemplates() {
return TEMPLATES;
}
function getTemplate(name) {
if (Object.prototype.hasOwnProperty.call(TEMPLATES, name)) {
return TEMPLATES[name];
}
}
function hasTemplate(name) {
return Object.prototype.hasOwnProperty.call(TEMPLATES, name);
}
function setTemplate(name, template) {
return TEMPLATES[name] = template;
}
export { getTemplates as a, setTemplates as b, getTemplate as g, hasTemplate as h, setTemplate as s };