jakearchibald / idb

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

Did idb become a dependency of a popular npm package in mid 2019? #143

Closed ZYinMD closed 4 years ago

ZYinMD commented 4 years ago

image

So I'm hoping to choose between idb and localforage without actually trying them (I know, don't despise me), and according to npmcharts, idb suddenly got a lot of traction in mid 2019. I wonder if it's because a popular package began depending on it?

If the increased number of installs came from end users, then I'd definitely choose idb because people obviously loved it.

But if the increased number of installs came from being a dependency, then the number of real end users who actually use it may still be far less than localforage, and as an end user maybe I should use localforage.

Thanks!

changhz commented 4 years ago

i've never used localforage and am a newcomer on idb. imo idb is not as intuitive as a traditional key-value storage and for me it takes some time to understand the concept behind indexeddb and to get used to it.

you may not need something as flexible and extensible as idb in your projects but why not leave some rooms for the possibilities in the future.

jakearchibald commented 4 years ago

I wouldn't recommend local forage unless you're dealing with ancient browsers. The code is pretty bloated to handle all that.

However, if you just want a key val store, try https://www.npmjs.com/package/idb-keyval.

ZYinMD commented 4 years ago

Thanks @jakearchibald for your answer! I'll choose idb then.

Would you care to comment a little bit on the original question? (why idb suddenly became popular in mid 2019) Just a little curious ~~

jakearchibald commented 4 years ago

I'm not sure to be honest. I only noticed it last month.

I rewrote the library at the start of the year, which I think gave it a bump in popularity, but I agree that it's probably a dependency of something super popular.