Skip to content

Commit 82d2d89

Browse files
author
Ubuntu
committed
browserify
1 parent e87b7d8 commit 82d2d89

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

dist/rss-parser.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! rss-parser 1.1.0 */
1+
/*! rss-parser 2.0.0 */
22

33
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.RSSParser = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
44
var Entities = require("entities");
@@ -22,7 +22,7 @@ var stripHtml = function(str) {
2222
Parser.parseString = function(xml, callback) {
2323
XML2JS.parseString(xml, function(err, result) {
2424
if (err) throw err;
25-
var json = {feed: {}};
25+
var json = {feed: {entries: []}};
2626
var channel = result.rss.channel[0];
2727
if (channel['atom:link']) json.feed.feedUrl = channel['atom:link'][0].href;
2828
TOP_FIELDS.forEach(function(f) {
@@ -42,8 +42,7 @@ Parser.parseString = function(xml, callback) {
4242
entry.guid = item.guid[0]._;
4343
}
4444
entry.categories = item.category;
45-
json.entries = json.entries || [];
46-
json.entries.push(entry);
45+
json.feed.entries.push(entry);
4746
})
4847
callback(null, json);
4948
});

0 commit comments

Comments
 (0)