3 ms·
I wonder if it is possibly to access the local scope with similar trickery. It would be useful to get a reference to a local variable via a string: import
by silverwind 7y ago
I wonder if it is possibly to access the local scope with similar trickery. It would be useful to get a reference to a local variable via a string:
import 'foo'
import 'bar'
(function (module) {
console.info(localThis[module]);
})('foo')