Identify which NPM libraries are used on a website with Bundle Scanner

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.

Bundle Scanner →

Published by Bramus!

Bramus is a frontend web developer from Belgium, working as a Chrome Developer Relations Engineer at Google. From the moment he discovered view-source at the age of 14 (way back in 1997), he fell in love with the web and has been tinkering with it ever since (more …)

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.