danmactough / node-feedparser

Robust RSS, Atom, and RDF feed parsing in Node.js
Other
1.97k stars 192 forks source link

[Question] How to get only one latest feed item? #200

Closed eduarddotgg closed 6 years ago

eduarddotgg commented 7 years ago

Hi! I'm new to JS, could someone help how to get only one latest feed item?

Thank you.

r1b commented 7 years ago

I would like this feature as well - right now I implement this with an external LRU cache.

danmactough commented 6 years ago

Due to the nature of feeds, you have no guarantee that any particular item (such as the first or last item) is the "latest" or most recent. You'll have to examine each item and choose the one you want.