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

feed

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

feed - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

26

lib/feed.js

@@ -1,3 +0,7 @@

var xml = require('xml');
var xml = require('xml');
var moment = require('moment');
// ============================================================================
// Feed Main Module
// ============================================================================
function Feed(options, items) {

@@ -7,5 +11,5 @@ this.title = options.title;

this.link = options.link;
this.author = options.author;
this.copyright = options.copyright;
this.language = options.language; // fr-CA, en-US...
//this.author = options.author;
//this.copyright = options.copyright;
//this.language = options.language; // fr-CA, en-US...
this.items = items || [];

@@ -19,3 +23,3 @@

description: options.description,
author: options.author
date: options.date
};

@@ -39,2 +43,5 @@

// ============================================================================
// Real Simple Syndication 2.0 (RSS 2.0)
// ============================================================================
function rss20(options) {

@@ -50,3 +57,3 @@ var items = [];

// Required RSS 2.0 channel ellements
// Required RSS 2.0 channel elements
channel.push({ title: options.title });

@@ -56,6 +63,8 @@ channel.push({ description: options.description });

// Required RSS 2.0 item elements
for(item in options.items) {
channel.push({ item: [
{ title: options.items[item].title },
{ title: { _cdata: options.items[item].title }},
{ link: options.items[item].link },
{ pubDate: moment(options.items[item].date).format("ddd, DD MMM YYYY HH:mm:ss ") + 'GMT' },
{ description: { _cdata: options.items[item].description }}

@@ -65,5 +74,6 @@ ]});

return xml(rss, true);
return '<?xml version="1.0"?>\n' +
xml(rss, true);
}
module.exports = Feed;
{
"name": "feed",
"version": "0.1.0",
"description": "Feed Wrapper. Simplest content syndication wrapper for Atom and RSS 2.0.",
"version": "0.1.1",
"description": "Feed is the simplest content syndication wrapper for Atom and RSS 2.0.",
"homepage": "https://github.com/jpmonette/feed",
"author": "Jean-Philippe Monette",
"keywords": [
"xml",
"rss",
"atom",
"feed",
"syndication"
],
"bugs": {
"url": "https://github.com/jpmonette/feed/issues"
},
"main": "lib/feed.js",
"dependencies": {
"xml": ">= 0.0.5"
"xml": ">= 0.0.5",
"moment": ">= 1.5.0"
},

@@ -16,7 +29,8 @@ "engines": {

},
"repository":
{
"type": "git",
"url": "https://github.com/jpmonette/feed"
}
"repository":
{
"type": "git",
"url": "https://github.com/jpmonette/feed"
}
}
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