Bundle Scanner identifies which npm libraries are used on any website. It downloads every Javascript file from a URL and searches through the files for code that matches one of the 35,000 most popular npm libraries.
The scanning itself works in a pretty ingenious way:
When a user requests to scan a website, Bundle Scanner scrapes all the Javascript bundles that are used on that specific URL. For each bundle, it picks out tokens that can be used to search through its library index. It then scores NPM releases based mainly on how many tokens it can find in the same order in both the bundle and in the library code. Since bundlers change the order of code in ways that are hard to predict, it is unusual to find anything close to an exact match. Bundle Scanner then selects the best matching version of every library.
Once you’ve scanned a website, be sure to hit the “View Libraries” button next to a file to see the libraries that the scanner detected.