Try any JavaScript library in the console

Isaías Chávez
February 2021
2 min read

Yesterday I noticed something interesting on the date-fns website: the documentation actually exposes the full library so you can test anything right from the browser console.

Brilliant. New bar for every JS/wasm library site I visit.

— Guillermo Rauch (@rauchg) February 17, 2021

It's a great idea, but I'm not sure how many other libraries do something similar. And if you want to compare two libraries side by side, waiting for every project to adopt this pattern doesn't seem realistic.

The good news is you don't actually have to wait. With skypack you can load any library on the fly. Just open your browser's console and import whatever you want.

Dynamic import with Skypack

Super handy when you need to test something quickly.