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

rss-parser

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rss-parser - npm Package Compare versions

Comparing version 3.7.2 to 3.7.3

dist/rss-parser.js.map

5

index.d.ts

@@ -5,4 +5,4 @@ import { Options } from 'xml2js';

export interface Headers {
readonly Accept: string;
readonly 'User-Agent': string;
readonly Accept?: string;
readonly 'User-Agent'?: string;
}

@@ -21,2 +21,3 @@

readonly customFields?: CustomFields;
readonly timeout?: number;
}

@@ -23,0 +24,0 @@

30

lib/parser.js

@@ -224,4 +224,3 @@ "use strict";

decorateItunes(feed, channel) {
let items = channel.item || [],
entry = {};
let items = channel.item || [];
let categories = [];

@@ -231,4 +230,3 @@ feed.itunes = {}

if (channel['itunes:owner']) {
let owner = {},
image;
let owner = {};

@@ -241,13 +239,15 @@ if(channel['itunes:owner'][0]['itunes:name']) {

}
if(channel['itunes:image']) {
let hasImageHref = (channel['itunes:image'][0] &&
channel['itunes:image'][0].$ &&
channel['itunes:image'][0].$.href);
image = hasImageHref ? channel['itunes:image'][0].$.href : null;
}
feed.itunes.owner = owner;
}
if(image) {
if (channel['itunes:image']) {
let image;
let hasImageHref = (channel['itunes:image'][0] &&
channel['itunes:image'][0].$ &&
channel['itunes:image'][0].$.href);
image = hasImageHref ? channel['itunes:image'][0].$.href : null;
if (image) {
feed.itunes.image = image;
}
feed.itunes.owner = owner;
}

@@ -262,3 +262,7 @@

if(channel['itunes:keywords']) {
feed.itunes.keywords = channel['itunes:keywords'][0].split(",");
let keywords=channel['itunes:keywords'][0];
if(keywords && typeof keywords._ === 'string'){
keywords=keywords._
}
if(keywords)feed.itunes.keywords = keywords.split(",");
}

@@ -265,0 +269,0 @@ utils.copyFromXML(channel, feed.itunes, fields.podcastFeed);

@@ -45,4 +45,8 @@ const utils = module.exports = {};

const { keepArray } = options;
if (xml[from] !== undefined)
if (xml[from] !== undefined){
dest[to] = keepArray ? xml[from] : xml[from][0];
}
if (dest[to] && typeof dest[to]._ === 'string') {
dest[to]=dest[to]._;
}
})

@@ -49,0 +53,0 @@ }

{
"name": "rss-parser",
"version": "3.7.2",
"version": "3.7.3",
"main": "index.js",

@@ -21,3 +21,4 @@ "types": "index.d.ts",

"puppeteer": "^1.16.0",
"webpack": "^3.12.0"
"webpack": "^4.41.0",
"webpack-cli": "^3.3.9"
},

@@ -24,0 +25,0 @@ "dependencies": {

@@ -61,2 +61,3 @@ # rss-parser

parser.parseURL(CORS_PROXY + 'https://www.reddit.com/.rss', function(err, feed) {
if (err) throw err;
console.log(feed.title);

@@ -63,0 +64,0 @@ feed.items.forEach(function(entry) {

@@ -41,3 +41,2 @@ {

"itunes": {
"image": "https://www.narro.co/images/narro-icon-lg.png",
"owner": {

@@ -47,2 +46,3 @@ "name": "foobar",

},
"image": "https://www.narro.co/images/narro-icon-lg.png",
"author": "foobar@gmail.com",

@@ -49,0 +49,0 @@ "subtitle": "foobar uses Narro to create a podcast of articles transcribed to audio.",

@@ -239,5 +239,2 @@ "use strict";

it('should respect timeout option', function(done) {
var INPUT_FILE = __dirname + '/input/encoding.rss';
var OUTPUT_FILE = __dirname + '/output/encoding.json';
var ENCODING = 'latin1';
var server = HTTP.createServer(function(req, res) {});

@@ -263,2 +260,6 @@ server.listen(function() {

});
it('should parse giantbomb-podcast', function(done) {
testParseForFile('giantbomb-podcast', 'rss', done);
});
})
var webpack = require("webpack");
module.exports = {
entry: {
"rss-parser": "./browser.js"
"rss-parser": "./index.js"
},
output: {
path: __dirname,
filename: "dist/[name].min.js"
filename: "dist/[name].js",
libraryTarget: 'umd',
globalObject: 'this',
library: 'RSSParser'
},

@@ -15,3 +18,3 @@ resolve: {

module: {
loaders: [{
rules: [{
test: /\.js$/,

@@ -21,2 +24,5 @@ loader: 'babel-loader?presets[]=env',

},
externals: {
xmlbuilder:'xmlbuilder'
},
node: {

@@ -23,0 +29,0 @@ fs: "empty"

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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