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

rss

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rss - npm Package Compare versions

Comparing version 0.2.1 to 0.3.0

2

lib/rss.js

@@ -21,2 +21,3 @@ /*

this.pubDate = options.pubDate;
this.hub = options.hub;
this.docs = options.docs;

@@ -86,2 +87,3 @@ this.copyright = options.copyright;

ifTruePush(data.ttl, channel, { 'ttl': data.ttl });
ifTruePush(data.hub, channel, { 'atom:link': { _attr: { href: data.hub, rel: 'hub' } } });

@@ -88,0 +90,0 @@ if (data.categories) {

31

package.json
{
"name": "rss",
"version": "0.2.1",
"version": "0.3.0",
"description": "RSS feed generator. A really simple API to add RSS feeds to any project.",

@@ -16,14 +16,11 @@ "homepage": "http://github.com/dylang/node-rss",

],
"repository":
{
"repository": {
"type": "git",
"url": "http://github.com/dylang/node-rss"
},
"bugs":
{
"bugs": {
"mail": "dylang@gmail.com",
"url": "http://github.com/dylang/node-rss/issues"
},
"dependencies":
{
"dependencies": {
"xml": "~0.0.4",

@@ -33,14 +30,18 @@ "mime": "~1.2.11"

"devDependencies": {
"chai": "~1.7.2",
"mocha": "~1.12.0"
"chai": "~1.8.1",
"mocha": "~1.17.0"
},
"main": "lib/rss.js",
"scripts": {
"test": "./node_modules/.bin/mocha --reporter spec"
"test": "./node_modules/.bin/mocha --reporter spec"
},
"engines": { "node": ">=0.4.0" },
"licenses" :
[
{ "type" : "MIT", "url" : "http://github.com/dylang/node-rss/raw/master/LICENSE" }
"engines": {
"node": ">=0.4.0"
},
"licenses": [
{
"type": "MIT",
"url": "http://github.com/dylang/node-rss/raw/master/LICENSE"
}
]
}
}

@@ -38,2 +38,3 @@ # RSS for Node [![Build Status](https://secure.travis-ci.org/dylang/node-rss.png)](http://travis-ci.org/dylang/node-rss)

* `ttl` _optional_ **integer** Number of minutes feed can be cached before refreshing from source.
* `hub` _optional_ **PubSubHubbub hub url** Where is the PubSubHubb hub located.

@@ -109,6 +110,6 @@ ### Add items to a feed

author: 'Guest Author', // optional - defaults to feed author property
date: 'May 27, 2012' // any format that js Date can parse.
date: 'May 27, 2012', // any format that js Date can parse.
lat: 33.417974, //optional latitude field for GeoRSS
long: -111.933231, //optional longitude field for GeoRSS
enclosure : {url:'...', file:'path-to-file'} // optional enclosure
enclosure: {url:'...', file:'path-to-file'} // optional enclosure
});

@@ -166,2 +167,2 @@

TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

@@ -219,3 +219,31 @@ /*

});
it('should work with PubSubHubbub hub', function(done) {
var feed = new RSS({
title: 'title',
description: 'description',
feed_url: 'http://example.com/rss.xml',
site_url: 'http://example.com',
hub: 'http://example.com/hub'
});
var expectedResult = '<?xml version="1.0" encoding="UTF-8"?>\n'+
'<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">'+
'<channel>'+
'<title><![CDATA[title]]></title>'+
'<description><![CDATA[description]]></description>'+
'<link>http://example.com</link>'+
'<generator>RSS for Node</generator>'+
'<lastBuildDate>' + new Date().toUTCString() +'</lastBuildDate>'+
'<atom:link href="http://example.com/rss.xml" rel="self" type="application/rss+xml"/>'+
'<atom:link href="http://example.com/hub" rel="hub"/>'+
'</channel>'+
'</rss>';
var result = feed.xml();
expect(result).to.equal(expectedResult);
done();
});
});

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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