Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

get-rss-atom

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-rss-atom - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2-a

20

get.js
'use strict';
exports.getRssAtom = function(feedUrl) {
exports.getRssAtom = function(feedUrl, callback) {

@@ -72,11 +72,11 @@ const

const parser = function (res) {
let content = '', count = 0;
res.on('data', chunk => content += chunk);
res.on('end', () => {
extractItems(content).forEach((item) => {
count++;
console.log(`\n--${count}-- ${item.title}\n${item.description}\n${item.href}\n`)
})
});
console.log(`Got response: ${res.statusCode}`)
if (res.statusCode === 200) {
let content = '';
res.on('data', chunk => content += chunk);
res.on('end', () => {
callback(extractItems(content))
});
} else {
console.error(`No content, response code was: ${res.statusCode}`)
}
};

@@ -83,0 +83,0 @@

{
"name": "get-rss-atom",
"version": "1.0.1",
"description": "Get RSS from URL and return JSON (not ready yet)",
"version": "1.0.2a",
"description": "Reed feed content from URL and return Array with Objects",
"main": "get.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo 'no test yet' && exit 1"
},
"author": "Niels Koster",
"license": "ISC",
"license": "MIT",
"dependencies": {}
}

@@ -1,3 +0,14 @@

t = require('./get');
test = require('get-rss-son/get');
t.getRssAtom('https://www.geenstijl.nl/feeds/recent.atom');
let
count = 0;
hostFeed = '';
if (process.argv.length > 1) {
hostFeed = process.argv[2]
}
test.getRssAtom(hostFeed, content => content.forEach((item) => {
count++;
console.log(`\n--${count}-- ${item.title}\n${item.description}\n${item.href}\n`)
}));
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc