Discussion: Module Reflection - import.reflect

2019-01-25 Thread Randy Buchholz
Would it be worthwhile to add reflection to modules as a distinct feature? `import.meta.url` is a basic form of reflection, but it seems (?) `meta` is trying to be a fairly loose specification. Being able query a module can be helpful. For example, if I can see the static imports, I can conditio

Re: Discussion: Module Reflection - import.reflect

2019-01-25 Thread Jordan Harband
In `import * as m from myModule`, `m.default` is already the default export; `Object.keys(m)` is already the list of export names, and `Object.entries(m).filter(([k, v]) => typeof v === 'function'))` is the list of functions. On Fri, Jan 25, 2019 at 5:27 AM Randy Buchholz wrote: > Would it be wo