Named factory functions

# Sultan (5 years ago)

Where there any attempts to allow factory functions the ability to assume the name of the binding they are assigned to?

Consider the following:

function factory () { return function () {} } var foo = factory() console.assert(foo.name === 'foo')

# Jordan Harband (5 years ago)

I suspect that would break a ton of code - ES6 name inference already broke some of mine, but I was able to work around it by using this kind of indirection.