Skip to content

Instantly share code, notes, and snippets.

@ptaberg
Last active June 23, 2019 21:43
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 ptaberg/dd3a78b593e165399fb3e1883b6dd7e2 to your computer and use it in GitHub Desktop.
Save ptaberg/dd3a78b593e165399fb3e1883b6dd7e2 to your computer and use it in GitHub Desktop.
import.js
// main.js
export walk() {/** . . . */}
export run() {/** . . . */}
export jump() {/** . . . */}
// func.js
import { walk, run, jump } from './main.js'
walk()
run()
jump()
// OR
import * as file from './main.js'
file.walk()
file.run()
file.jump()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment