Skip to content

Instantly share code, notes, and snippets.

@jhnns
Created May 16, 2017 14: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 jhnns/d3fe3509b2a3c879a9b22a5ef5b0284e to your computer and use it in GitHub Desktop.
Save jhnns/d3fe3509b2a3c879a9b22a5ef5b0284e to your computer and use it in GitHub Desktop.
CJS consuming an ESM
const driverPromise = import("dbdriver");
exports.readFromDb = async (query) => {
return (await driverPromise).read(query);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment