Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

export all functions from js file

// Unfortunately, there's no wildcard export.

// You use the "export" keyword at the begining of each function.
export function foo() {
    // ...
}
export function bar() {
    // ...
}

// or export them all at the bottom (ES6)
export { foo, bar, bizz, bazz }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #export #functions #js #file
ADD COMMENT
Topic
Name
9+1 =