Squirrelly with conditionals

node v10.24.1
version: 1.1.0
endpointsharetweet
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 })
Loading…

no comments

    sign in to comment