Spacebars.kw contains a hash object that has a hash of input parameters.
Meteor has two methods for comparing methods: one direct match, in which the parameters are directly entered, for example {{testHelper "variable1" "variable2" "variable3"}} will correspond to function(a,b,c) as variables 1-3 corresponding to a, b and c, respectively.
The second input method uses a hash:
{{testHelper a="variable1" b="variable2" c="variable3"}}
This will give a single parameter function(a) , where a is the Spacebars.kw object.
The Spacebars.kw object will have a subobject called hash with a structure that corresponds to:
{ "a" : "variable1", "b" : "variable2", "c" : "variable3" }
The meteor will try to match the first parameter directly, but subsequent parameters will be mapped as hashes if the second input is empty, for example, if you use {{testHelper 'hello'}} , where b will be null, so this is instead of a hash.
This is generally indicated, so if you get b as a Spacebars.kw object, you can assume that there was no second input. An alternative would be to use hash style declarations, and then directly check if the hash value is null :
{{testHelper text="Hello"}} {{testHelper text="Hello" othertext="Hellooo"}}
and assistant:
Template.registerHelper('testHelper', function(kw) { console.log(kw.hash.text); console.log(kw.hash.othertext); });