Squirrelly with conditionals
var Sqrl = require("squirrelly")
// If you are in a browser, Sqrl is already globally available.
// If you are using Webpack, you can: import * as Sqrl from 'squirrelly'
var myTemplate = "\
{{if(options.somevalue === 1 && options.someothervalue === 1)}}\
Values are both 1\
{{#else}}\
Display this\
{{/if}}\
"
var templateResult = Sqrl.Render(myTemplate, {
somevalue: 1, someothervalue: 1 // change to 2
})
no comments