All interesting, but in this case where I assign a labeled function to a function
let fnc = function () { console.log("called");}
fnc.intrn = function (val) {console.log("called : ", val); }
you can call it as it works and is there
>fnc.intrn("yup")
called : yup
but if you type fnc in the console you only see.
>fnc
ƒ () { console.log("called");}
but of course if you type "func." a list pops up of all the stuff it has like prototype, constructor, bind, call, caller, length, name, intrn, etc.
while toString just shows the code of the function
>fnc.toString()
"function () { console.log("called");}"
I guess you could override toString (or make another function) to show what you want as well or instead.
Far right in the output of Chrome's console you see VM##:1 and can click it alas it's the same as typing toString()
Now if you put a breakpoint (on line 1 in this case) and call the function fnc() then it stops execution on the VM##:1 source (Not listed in Source Files Tabs ~ Network, Overrides, Filesystem, Snippets). [The right click "Show function definition" trick is better without a console log reference like this (thanks for that).]
But then you can see it first under Scope and 'script' (in this case 'fnc') while of course most of the other entities are parented under __proto__ and prototype has the constructor.
There you can also see double square brackets holding FunctionLocation and Scopes, which is itself in Script and the global which seems to be the Local Scope of 'this' aka Window.
Which are not to be mistaken with the Proto's FunctionLocation = unknown nor the Scope which has 'no properties', as I suppose one can say that that is Monadal.
Okay so you can get there, in two or three roundabout ways but it's not obvious or particularly good in my opinion. Maybe a custom show hidden function object parameters function can be added to 'object' prototype but it's not critical and I'd be looking for a programmatic solution as well at that point?
Okay so that's when you can use Object's getOwnPropertyNames like this on the function with a hidden function (or what-have-you) etc. attached.
>Object.getOwnPropertyNames(fnc)
(6) ["length", "name", "arguments", "caller", "prototype", "intrn"]