I have a function that accepts a function parameter that I'd like to use as the key to an object...
function foo(func) {
return { func: true };
}
This, of course, returns an object with the string 'func' as the key (not what I want).
Is the right solution to create a string from func
and then create the object?
Is there a way to create a hash from a function?