[javascript] Is there an easy way to convert jquery code to javascript?

Is there an easy way to convert jQuery code to regular javascript? I guess without having to access or understand the jQuery source code.

This question is related to javascript jquery code-conversion

The answer is

This will get you 90% of the way there ; )

window.$ = document.querySelectorAll.bind(document)

For Ajax, the Fetch API is now supported on the current version of every major browser. For $.ready(), DOMContentLoaded has near universal support. You Might Not Need jQuery gives equivalent native methods for other common jQuery functions.

Zepto offers similar functionality but weighs in at 10K zipped. There are custom Ajax builds for jQuery and Zepto as well as some micro frameworks, but jQuery/Zepto have solid support and 10KB is only ~1 second on a 56K modem.

Similar questions with javascript tag:

Similar questions with jquery tag:

Similar questions with code-conversion tag: