4 ms·
For most of the libraries I've used so far, they generally seem to follow the convention of having the entire library in a single object as the default export w
by lewisl9029 11y ago
For most of the libraries I've used so far, they generally seem to follow the convention of having the entire library in a single object as the default export while also exposing each individual function/property as named exports.
In the case that they don't, I generally just try "import * as Foo" to find out exactly what the library exports. Not saying this is ideal, but it really isn't too bad either, in my opinion, considering the flexibility and conciseness this approach offers for the general case.