What is the difference between these import methods?
Method 1:
import {sum, pi} from "lib/math";
Method 2:
import exp, {pi, e} from "lib/mathplusplus";
The es2015 docs showed these two examples, and I can't figure out the purpose of the curly braces. It seems like all of the things listed after import will be assigned to the window
object anyway.
Docs for reference: https://babeljs.io/docs/learn-es2015/