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.6 to 1.0.7-a

3

get.js

@@ -76,3 +76,3 @@ 'use strict';

let t = getTitle(content.toString());
return { title: t, items: getItems(content.toString(), 'item')
return { title: t, href: feedUrl, items: getItems(content.toString(), 'item')
.concat(getItems(content.toString(), 'entry')) }

@@ -83,2 +83,3 @@ }

let content = '';
res.setEncoding('utf8');
res.on('data', chunk => content += chunk);

@@ -85,0 +86,0 @@ res.on('end', () => callback(extractItems(content)));

{
"name": "get-rss-atom",
"version": "1.0.6",
"version": "1.0.7a",
"description": "Reed feed content from URL and return Array with Objects",

@@ -13,2 +13,3 @@ "main": "get.js",

},
"keywords": ["rss", "atom"],
"author": "Niels Koster",

@@ -15,0 +16,0 @@ "license": "MIT",

@@ -5,3 +5,3 @@ Simple RSS/ATOM feed parser.

```
~~~javascript
{

@@ -18,23 +18,33 @@ title: String,

}
```
~~~
### Install
```
npm init
~~~bash
npm install --save get-rss-atom
```
~~~
### Usage
For example, create `reader.js`
An example reader:
```
reader = require('get-rss-atom');
~~~bash
mkdir reader
cd reader
npm init -y
npm install --save get-rss-atom
~~~
Create `reader.js`
~~~javascript
'use strict';
const reader = require('get-rss-atom');
let
count = 0;
count = 0,
feedUrl = '';
if (process.argv.length > 1) {
if (process.argv.length > 2) {
feedUrl = process.argv[2]

@@ -47,14 +57,14 @@ } else {

reader.getRssAtom(feedUrl, feed => {
console.log(`\n${feed.title}\n`);
console.log(`\n${feed.title} (${feed.href})\n`);
feed.items.forEach((item) => {
count++;
console.log(`\n--${count}-- ${item.title}\n${item.content}\n${item.href}\n`)
}
)});
```
})
});
~~~
### Run
Run:
```
~~~bash
node reader http://www.at5.nl/feeds/at5/nieuws/V100/nieuws
```
~~~
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