Skip to content
This repository has been archived by the owner on Feb 22, 2019. It is now read-only.

fluidsonic/co-feedparser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

co-feedparser

co wrapper for feedparser package.

Quickstart

const co         = require('co')
const feedParser = require('co-feedparser')

co(function*() {
    try {
        const meta = yield feedParser('https://github.com/blog/all.atom')
        const articles = meta.articles

        console.log(articles)
    }
    catch (error) {
        console.error(error.stack)
    }
})

Usage

feedParser (stream | uri, [options])

Uses feedparser on the given stream and fetches all articles at once.

Returns feedparser's meta data with an additional property articles.

Parameters

  • stream - A readable stream from which feedparser will read its data.

  • uri - A string can also be given instead of a stream which is a shortcut for request(uri).

  • options - Options used by feedparser.

  • options.requestOptions - When passing a uri instead of a stream, these options will be passed to request(uri, options).

Installation

$ npm install co-feedparser

Requirements

Node 4.0.0 or newer

License

MIT

About

co wrapper for feedparser package.

Resources

License

Stars

Watchers

Forks

Packages

No packages published