To use @math in dust patterns, you need to add vacuum cleaners that are excluded from the dust pack by default.
The specific syntax you need to “load” the vacuum cleaners in node:
var dust = require('dustjs-linkedin');
dust.helper = require('dustjs-helpers');
, , , , @gt @math
var baseContext = dust.makeBase({
position: function(chunk, context) {
return context.stack.index + 1;
},
});
{position} ${idx}, 1 n.