Say I have a module (./my-module.js) that has an object which should be its return value:
let values = { a: 1, b: 2, c: 3 }
// \"export values\
export const a = 1;
export const b = 2;
export const c = 3;
This will work w/ Babel transforms today and should take advantage of all the benefits of ES2016 modules whenever that feature actually lands in a browser.
You can also add export default {a, b, c}; which will allow you to import all the values as an object w/o the * as, i.e. import myModule from 'my-module';
Sources:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export
http://www.2ality.com/2014/09/es6-modules-final.html