mirror of
https://github.com/panosoft/inline-html
synced 2026-01-13 13:04:30 -08:00
13 lines
314 B
JavaScript
13 lines
314 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}
|
|
*/
|
|
const isTemplateExpression = path => /^{{.*}}$/.test(path);
|
|
|
|
module.exports = isTemplateExpression;
|