New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.2 to 1.0.3-a

eee.js

15

get.js

@@ -12,3 +12,2 @@ 'use strict';

host: feed.hostname,
port: feed.port,
path: feed.path

@@ -73,14 +72,8 @@ };

const parser = function (res) {
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}`)
}
let content = '';
res.on('data', chunk => content += chunk);
res.on('end', () => callback(extractItems(content)));
};
if (feed.port === '80') {
if (feed.protocol === 'http:') {
http.get(options, parser).on('error', e => {

@@ -87,0 +80,0 @@ console.error(e.message)

{
"name": "get-rss-atom",
"version": "1.0.2",
"version": "1.0.3a",
"description": "Reed feed content from URL and return Array with Objects",
"main": "get.js",
"scripts": {
"test": "node test.js http://rss.fok.nl/feeds/nieuws || exit 1"
"test": "echo 'no test yet' && exit 1"
},

@@ -9,0 +9,0 @@ "author": "Niels Koster",

Simple RSS/ATOM feed parser.
WIP: this is an attempt to create a new generic library since other libraries have failed, at least for me.
`getRssAtom(url)` returns a callback with an object array.
Usage:
### Install
`node get.js -host www.geenstijl.nl -port 443 -path /feeds/recent.atom`
```
npm init
npm install --save get-rss-atom
```
or
### Usage
`node get.js -host www.at5.nl -path /feeds/at5/nieuws/V100/nieuws`
For example, create `test.js`
```
test = require('get-rss-atom/get');
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`
)
}));
```
### Run
```
node test.js http://www.at5.nl/feeds/at5/nieuws/V100/nieuws
```

@@ -1,2 +0,2 @@

test = require('./get');
test = require('get-rss-son/get');

@@ -3,0 +3,0 @@ let

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