Suppose you have the following file:
graphService.js
const foo = () => { return 'foo' }
const bar = () => { return 'bar' }
How would it be possible to export all the functions so they can be used like this:
connsumer.js
import { graph } from 'src/services/graph/graphService'
graph.foo()
graph.bar()
With an extra file in between it's easy as you can do something like this:
graphMiddelFile.js
import * as graph from 'src/services/graph/graphCore'
export const graph = graph
Is this possible to do without a file in the middle and without using import * as graph from 'src/services/graph/graphService'
in the consumer.js
file?
I looked around the internet but couldn't find something similar. Thank you for your help.