Search code examples
dust.js

Pass in the logical negation of a boolean to a partial template in dust


I Have a partial template that takes a boolean, and I want that boolean to be a negation of a reference I have. So if my reference is true I want the value passed in to be false. Any way I can do this in dust without modifying the partial template?

{>my-partial}
     key=!value
{my-partial/}

Solution

  • I solved this by changing the js template helper I was using to pass in the intended reference