Javascript Node : input pageVars as an object

Am I right that pageVars is an object or a JSON object?
I can set the input of a JS node to be one of the properties of pageVars (ie the “variables”).
But can I set the input to be the pageVars object itself or is this allowed?
I can specifiy the node input as a function, pageVars. But things don’t work as I would have expected from there.