I have a file that default exports an object containing constants. I'd also like to export each of the properties of the object. Is there a way to do this that doesn't involve writing them all out?
import keyMirror from 'keymirror';
// keymirror outputs an object with key = val. eg. {a: a, b: b, ...}
const types = keyMirror({
FREEFORM: null,
GRAPH_IMAGE: null,
...
});
export default types;
export const FREEFORM = types.FREEFORM;
export const GRAPH_IMAGE = types.GRAPH_IMAGE;
...