fetch-reddit

0.1.0 • Public • Published

fetch-reddit

Build Status Dependency Status devDependency Status

A utility function for fetching links from subreddits or Reddit comment threads

Usage

npm install fetch-reddit --save
import { getPosts } from 'fetch-reddit'
 
function processPosts (posts) {
  // Do something with the extracted posts
}
 
getPosts('/r/chillmusic').then(data => {
  // Array of extracted posts
  processPosts(data.posts)
 
  // Easy pagination
  data.loadMore().then(processPosts)
})

Linting

This project uses standard code style.

npm run lint

Testing

This project uses mocha with chai assertions for unit testing.

npm run test

Thanks

/fetch-reddit/

    Package Sidebar

    Install

    npm i fetch-reddit

    Weekly Downloads

    3

    Version

    0.1.0

    License

    MIT

    Last publish

    Collaborators

    • cookpete