Open andykais opened 5 years ago
Using this issue as a guide: https://github.com/janl/mustache.js/issues/538 it is possible to extract the variable names for a template. Therefore, I should be able to check if a given template is using valid variable names. E.g.
// check against builtin variables "https://example.com/post/{value}/comments/{index}" // valid // given { "input": ["search", "user"] } "https://example.com/user/{user}/search/{search}" // valid "https://example.com/user/{user}/search/{someotherval}" // invalid
also useful: https://github.com/wycats/handlebars.js/issues/1207. Consider using the barhandles repo
Using this issue as a guide: https://github.com/janl/mustache.js/issues/538 it is possible to extract the variable names for a template. Therefore, I should be able to check if a given template is using valid variable names. E.g.