A thin wrapper for jQuery in Node or in the browser, designed to provide a slim nonfunctional mock if jQuery cannot be loaded.
Want to use jQuery in your Browserify project but don't want to have it duplicated in your bundle if it's already present in the browser? Want your code to run in CLI testing outside the browser, without needing the overhead of a full implementation of the DOM like JSDOM provides? Want absolutely no assurances that this code will work?
Hey, I just met you, and this is crazy, but here's 1KB of code (once minified and gzipped), so call me MayQuery!
If MayQuery is in a browser, it will see whether
window.jQuery exists, and use that if it does.
If not, then it will try to run
require('jquery'), so you can
npm install that in your parent project if you want to include the full thing.
It's less than 1KB minified and gzipped; that's 1/32 the size of jQuery itself.