danmactough / node-feedparser

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

Synchronous version of library? #266

Closed iONinja closed 6 years ago

iONinja commented 6 years ago

Hi there,

You're library looks really nice, but I would love to be able to syncronously access the parsed feed. Seeing as there's no network or disk I/O, the library's API doesn't need to be asynchronous?

Let me know if this is already a feature, or you're planning to add it. Thank you!

scripting commented 6 years ago

I think this may be what you're looking for...

https://github.com/scripting/feedread

I felt as you do -- that all the piping was over-optimizing. For most applications, I just want the data from the feed in a JS object. Which is what feedRead does. It builds on Dan's feedParser package.

However it is not synchronous, because there is I/O involved in reading the feed over the web or from a local file, but inside the callback the feed is just a simple object.

Dave

danmactough commented 6 years ago

there is I/O involved in reading the feed over the web or from a local file

Thanks for explaining that so simply @scripting 🙏

iONinja commented 6 years ago

Thanks, that's just what I was looking for!