reallysimple 0.5.1 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/reallysimple.js +12 -3
- package/worknotes.md +4 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reallysimple",
|
|
3
3
|
"description": "A Node package that reads RSS-like feeds and calls back with a simple, consistent JavaScript object. Easy to use, hides the history.",
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.2",
|
|
5
5
|
"author": "Dave Winer <dave@scripting.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"files": [
|
package/reallysimple.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var myProductName = "reallysimple", myVersion = "0.5.
|
|
1
|
+
var myProductName = "reallysimple", myVersion = "0.5.2";
|
|
2
2
|
|
|
3
3
|
exports.readFeed = readFeed;
|
|
4
4
|
exports.convertFeedToOpml = convertFeedToOpml;
|
|
@@ -74,6 +74,15 @@ function emojiProcess (s) {
|
|
|
74
74
|
}
|
|
75
75
|
return (emoji.emojify (s, undefined, addSpan));
|
|
76
76
|
}
|
|
77
|
+
function stringToNum (theString) { //return a number if we can convert, otherwise return string -- 8/23/25 by DW
|
|
78
|
+
const num = Number (theString);
|
|
79
|
+
if (num == NaN) {
|
|
80
|
+
return (theString);
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
return (num);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
77
86
|
|
|
78
87
|
function convertFeedToOpml (theFeed) { //use this if you want to show an RSS feed in an outline
|
|
79
88
|
var theOutline = {
|
|
@@ -186,7 +195,7 @@ function convertFeed (oldFeed, whenstart) {
|
|
|
186
195
|
}
|
|
187
196
|
}
|
|
188
197
|
if (flFoundNamespace) {
|
|
189
|
-
newFeed.wpSiteId = linkToSite ["#"];
|
|
198
|
+
newFeed.wpSiteId = stringToNum (linkToSite ["#"]);
|
|
190
199
|
}
|
|
191
200
|
}
|
|
192
201
|
}
|
|
@@ -286,7 +295,7 @@ function convertFeed (oldFeed, whenstart) {
|
|
|
286
295
|
}
|
|
287
296
|
}
|
|
288
297
|
if (flFoundNamespace) {
|
|
289
|
-
newItem.wpPostId = linkToPostId ["#"];
|
|
298
|
+
newItem.wpPostId = stringToNum (linkToPostId ["#"]);
|
|
290
299
|
}
|
|
291
300
|
}
|
|
292
301
|
|