mirror of
https://github.com/KevinMidboe/inline-html.git
synced 2025-10-29 17:40:29 +00:00
15 lines
333 B
JavaScript
15 lines
333 B
JavaScript
/**
|
|
* Tests whether a path is a mustache template expression.
|
|
*
|
|
* Note: would be best if this was file extension specific
|
|
* (i.e. *.hbs => test for `{{ }}` )
|
|
*
|
|
* @param {String} path
|
|
* @return {Boolean}
|
|
*/
|
|
var isTemplateExpression = function (path) {
|
|
return /^{{.*}}$/.test(path);
|
|
};
|
|
|
|
module.exports = isTemplateExpression;
|