jakearchibald / idb

IndexedDB, but with promises
https://www.npmjs.com/package/idb
ISC License
6.34k stars 357 forks source link

Create a sandbox for running examples #248

Open psytron opened 2 years ago

psytron commented 2 years ago

Would be awesome if the example code on main page would be working code when users cut and paste. Right now the (...) ... in examples means users must do more digging to get examples working. Working code would speed up learning and adoption for new joiners.

jakearchibald commented 2 years ago

Those are there intentionally because the examples are incomplete. The ellipsis needs to be replaced with something.

There are other examples on the page that are complete.

Would a "sandbox" be useful? As in, a page that exposes the API on the global and sets up a couple of databases, so folks could play with them in the console?

psytron commented 2 years ago

Yeah, sandbox would be sweet too. Your examples on main page are perfect, if they were working code it would be very fast to get started and see the product in action quickly.