Skip to content

Instantly share code, notes, and snippets.

@lagden
Created August 3, 2018 20:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lagden/7ad486687fb2d0cbe24165b0a60ba9d5 to your computer and use it in GitHub Desktop.
Save lagden/7ad486687fb2d0cbe24165b0a60ba9d5 to your computer and use it in GitHub Desktop.
ECMAScript Modules (import/export)
const a = 'a'
export default a
export const b = 'b'
export {default as a} from './a'
export {b} from './b'
export {c as xxx, d as zzz} from './varios'
import * as icons from './icons'
const {a, b} = icons
console.log(a, b)
console.log(icons)
const o = {
c: 'c',
d: 'd'
}
export const {c} = o
export const {d} = o
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment