Throwing errors in templates is generally not a great practice, I'd rather render out "NaN" than have a page 500. In regards to combining helpers, in sites we use it alongside two other helpers range and compare, both of which are able to handle NaN values gracefully
Coverage decreased (-0.002%) to 99.596% when pulling c252c45fff5de45db735df40013a0fc4ea4527db on num-helper into 3b258b0fbdc20a6f3fa65923a5be152444f091ce on master.
Throwing errors in templates is generally not a great practice, I'd rather render out
"NaN"
than have a page 500. In regards to combining helpers, insites
we use it alongside two other helpersrange
andcompare
, both of which are able to handleNaN
values gracefully