function nodes I often use patterns like
let startup = true;
let startup = context.get('startup');
As far as I can tell, these can be replaced by the single instruction,
let startup = context.set('startup',true);
but I wonder whether this is strictly cricket in terms of JS syntax and the NR implementation of context storage. Any comments?
context.set() api does not return the value you set, so I'm not sure why that is working for you. It certainly doesn't work when I try it here.
I suspected that, so I'm as puzzled as you are. I'll try to figure out why it seems to work.
OK. I was fooling myself by checking the value with
Would it be a bad idea to allow
context.set() to return a value?
if it did wouldn't you want it to return a variation of 'success' or ''failed'