Retrieves the front page stories from Hacker News in JSON format.
var getFrontPageHN = require('frontpage-hn');
getFrontPageHN(function(err, posts) {
if (err) { throw err; }
console.log(posts);
});
// Example output:
/*
[{
id: 10768440,
title: 'Deep Learning: An MIT Press Book in Preparation',
postLink: 'http://goodfeli.github.io/dlbook/',
commentsLink: 'https://news.ycombinator.com/item?id=10768440',
comments: 20
},
...
]
*/
npm test