Skip to content

Instantly share code, notes, and snippets.

@dherman
Forked from anonymous/dave.js
Last active December 16, 2015 13:19
Show Gist options
  • Save dherman/5440405 to your computer and use it in GitHub Desktop.
Save dherman/5440405 to your computer and use it in GitHub Desktop.
export default f(1, 2, 3); // anonymous export
export let foo = 5; // named declaration export
export foo // named export of existing identifier
export foo, bar; // named export of multiple existing identifiers
export foo as f; // named aliasing export
export foo as f, bar; // you get the idea
import default glob from "glob"; // anonymous import
import sync from "glob"; // named import
import sync as s from "glob"; // named aliasing import
import "fs" as fs; // import of module instance object, not anonymous module
export default f(1, 2, 3); // anonymous export
export let foo = 5; // named declaration export
export <foo> // named export of existing identifier
export <foo, bar>; // named export of multiple existing identifiers
export <foo as f>; // named aliasing export
export <foo as f, bar>; // you get the idea
import glob from "glob"; // anonymous import
import <sync> from "glob"; // named import
import <sync as s> from "glob"; // named aliasing import
module fs from "fs"; // import of module instance object, not anonymous module
export default f(1, 2, 3); // anonymous export
export let foo = 5; // named declaration export
export <foo> // named export of existing identifier
export <foo, bar>; // named export of multiple existing identifiers
export <foo as f>; // named aliasing export
export <foo as f, bar>; // you get the idea
import glob from "glob"; // anonymous import
import <sync> from "glob"; // named import
import <sync as s> from "glob"; // named aliasing import
import "fs" as fs; // import of module instance object, not anonymous module
export default f(1, 2, 3); // anonymous export
export let foo = 5; // named declaration export
export foo // named export of existing identifier
export foo, bar; // named export of multiple existing identifiers
export foo as f; // named aliasing export
export foo as f, bar; // you get the idea
import "glob" as glob; // anonymous import
import sync from "glob"; // named import
import sync as s from "glob"; // named aliasing import
import module "fs" as fs; // import of module instance object, not anonymous module
export f(1, 2, 3); // anonymous export
export let foo = 5; // named declaration export
export static foo // named export of existing identifier
export static foo, bar; // named export of multiple existing identifiers
export static foo as f; // named aliasing export
export static foo as f, bar; // you get the idea
import glob from "glob"; // anonymous import
import static sync from "glob"; // named import
import static sync as s from "glob"; // named aliasing import
import "fs" as fs; // import of module instance object, not anonymous export
export default f(1, 2, 3); // anonymous export
export let foo = 5; // named declaration export
export { foo } // named export of existing identifier
export { foo, bar }; // named export of multiple existing identifiers
export { foo as f }; // named aliasing export
export { foo as f, bar }; // you get the idea
import glob from "glob"; // anonymous import
import { sync } from "glob"; // named import
import { sync as s } from "glob"; // named aliasing import
module fs from "fs"; // import of module instance object, not anonymous module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment