Skip to content

Instantly share code, notes, and snippets.

@EmmanuelObua
Created June 20, 2021 08:23
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 EmmanuelObua/c73ff3b45c059e4e021c16288caf33a2 to your computer and use it in GitHub Desktop.
Save EmmanuelObua/c73ff3b45c059e4e021c16288caf33a2 to your computer and use it in GitHub Desktop.
Export constants for npm
/**
* Add this at the end of jQueryClone.js file to export the $ function
* Check if we are using modules and export the $ function else attach it to the window object
*/
if (typeof exports != "undefined") {
exports.$ = $;
} else {
window.$ = $
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment