Skip to content

Instantly share code, notes, and snippets.

@spencerbeggs
Last active May 2, 2017 17:06
Show Gist options
  • Save spencerbeggs/f8dca6e9d08663d0fe8f63a51e7fa001 to your computer and use it in GitHub Desktop.
Save spencerbeggs/f8dca6e9d08663d0fe8f63a51e7fa001 to your computer and use it in GitHub Desktop.
Module Export demo
export function bar() {
console.log("bar");
}
export function bar2() {
console.log("bar2");
}
export function foo() {
console.log("foo");
}
export function foo2() {
console.log("foo2");
}
export { foo } from "./foo";
export { bar } from "./bar";
import * as foobar from "./index.js";
foobar.foo();
// "foo"
foobar.bar();
// bar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment