Skip to content

Instantly share code, notes, and snippets.

@matthewstokeley
Last active April 16, 2020 00:08
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 matthewstokeley/cb7b1ddd9b53ca2b947238bb4286c9aa to your computer and use it in GitHub Desktop.
Save matthewstokeley/cb7b1ddd9b53ca2b947238bb4286c9aa to your computer and use it in GitHub Desktop.
javascript-modules-in-5-seconds.md

wip needs editing

// Google Closure Library
google.require()
// ES6 Modules
import {export} from 'module'
// all
import * from 'module'
// aliasing
import * as namespace from 'module'
// default
// CommonJS
var module = require('module')
// exposes submodules
module.submodule = require('module').subModule
// AMD (Asynchronous Module Definition)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment