I have hard time understanding JavaScript libraries by reading their source code. How are you read source code of JS libraries? Do you have some technique which you use?
In addition to the other suggestions, using an editor like Visual Studio Code (code.visualstudio.com) allows you to CTRL-click on a symbol to display or jump to it's definition.
It's like an interactive "How-To..." book and saves the time most of us would spend browsing through the MDN web docs.
Some techniques I use:
If you're not looking for something in particular, but rather looking to understand the library in-and-out, then this tweet thread by Dan Abramov is really good advice. π
TheSheriff
Co-Founder, Founder, Entrepreneur & Problem Solver
Understand the main purpose of what you're looking at and then add the code to a beautifier. That's a good start. Could try and find an open source version of it somewhere.
Also, what you're asking about is called
Reverse Engineering.