Skip to content

Commit f1624e7

Browse files
author
Ubuntu
committed
update dist
1 parent 9071820 commit f1624e7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

dist/rss-parser.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! rss-parser 1.0.1 */
1+
/*! rss-parser 1.1.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");
@@ -11,7 +11,6 @@ var TOP_FIELDS = ['title', 'description', 'author', 'link'];
1111
var ITEM_FIELDS = [
1212
'title',
1313
'link',
14-
'guid',
1514
'pubDate',
1615
'author',
1716
]
@@ -21,7 +20,6 @@ var stripHtml = function(str) {
2120
}
2221

2322
Parser.parseString = function(xml, callback) {
24-
console.log('parse', xml);
2523
XML2JS.parseString(xml, function(err, result) {
2624
if (err) throw err;
2725
var json = {feed: {}};
@@ -40,6 +38,9 @@ Parser.parseString = function(xml, callback) {
4038
entry.content = item.description[0];
4139
entry.contentSnippet = Entities.decode(stripHtml(entry.content));
4240
}
41+
if (item.guid) {
42+
entry.guid = item.guid[0]._;
43+
}
4344
entry.categories = item.category;
4445
json.entries = json.entries || [];
4546
json.entries.push(entry);

0 commit comments

Comments
 (0)