Skip to content

Instantly share code, notes, and snippets.

@geta6
Created July 20, 2020 10:20
Show Gist options
  • Save geta6/20a6cc1f18a29bc98713e4c2aa2a4ea0 to your computer and use it in GitHub Desktop.
Save geta6/20a6cc1f18a29bc98713e4c2aa2a4ea0 to your computer and use it in GitHub Desktop.
import { hoge, fuga, piyo } from './sample';
console.log(hoge(), fuga(), piyo()); // HOGE FUGA PIYO
import sample from './sample';
console.log(sample()); // I AM MODULE;
import * as samples from './sample';
console.log(samples); // { hoge: Function, fuga: Function, piyo: Function, default: Function }
export const hoge = () => {
return 'HOGE';
};
export const fuga = () => {
return 'FUGA';
};
export const piyo = () => {
return 'PIYO';
};
export default () => {
return 'I AM MODULE';
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment