Closed cristiano-belloni closed 5 years ago
Not directly, but you could an ugly hack (or perhaps PR a proper solution? :)) with:
Object.keys(feed._index._index).length
It'd be good to expose count
property from the feed though (basically returning the value from the above code), so that one could do:
const itemsCount = feed.count
@cristiano-belloni A later update has created a db.index
getter function to simplify this. Closing for now.
Is there a way to get the number of elements in a feed? I'm trying to do pagination on a possibly long feed, and getting all of them doesn't seem the best way to do it.